Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function runArgs(configResourceUrl: string, argv: string[], stdin: NodeJS.ReadStream,
stdout: NodeJS.WriteStream, stderr: NodeJS.WriteStream, env: NodeJS.ProcessEnv,
runnerUri?: string, properties?: ISetupProperties) {
Setup.run(configResourceUrl, { argv, env, stdin }, runnerUri, properties)
.then((results: IActorOutputInit[]) => {
results.forEach((result: IActorOutputInit) => {
if (result.stdout) {
result.stdout.on('error', console.error);
result.stdout.pipe(stdout);
}
if (result.stderr) {
result.stderr.on('error', console.error);
result.stderr.pipe(stderr);
}
});
})
.catch(console.error);
}