Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// escape any argument that has a space in it
if (_.isString(arg) && arg.indexOf(' ') !== -1) {
return `"${arg}"`;
}
// otherwise just use the argument
return arg;
});
log.debug(`Spawning instruments with command: '${instrumentsExecArgs.join(' ')}'`);
if (this.withoutDelay) {
log.debug('And extra without-delay env: ' + JSON.stringify({
DYLD_INSERT_LIBRARIES: env.DYLD_INSERT_LIBRARIES,
LIB_PATH: env.LIB_PATH
}));
}
log.debug(`And launch timeouts (in ms): ${JSON.stringify(this.launchTimeout)}`);
return await spawn(this.instrumentsPath, args, {env});
}
// escape any argument that has a space in it
if (_.isString(arg) && arg.indexOf(' ') !== -1) {
return `"${arg}"`;
}
// otherwise just use the argument
return arg;
});
log.debug(`Spawning instruments with command: '${instrumentsExecArgs.join(' ')}'`);
if (this.withoutDelay) {
log.debug('And extra without-delay env: ' + JSON.stringify({
DYLD_INSERT_LIBRARIES: env.DYLD_INSERT_LIBRARIES,
LIB_PATH: env.LIB_PATH
}));
}
log.debug(`And launch timeouts (in ms): ${JSON.stringify(this.launchTimeout)}`);
return await spawn(this.instrumentsPath, args, {env});
}