🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@travetto/exec

Package Overview
Dependencies
Maintainers
1
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@travetto/exec - npm Package Compare versions

Comparing version

to
0.0.27

2

package.json

@@ -17,3 +17,3 @@ {

},
"version": "0.0.26"
"version": "0.0.27"
}
import * as cp from 'child_process';
import { ExecutionOptions, ExecutionResult } from './types';
import { scanDir, Entry } from '@travetto/base';
import { scanDir, Entry, BaseError } from '@travetto/base';
export function enhanceProcess(p: cp.ChildProcess, options: ExecutionOptions) {
export function enhanceProcess(p: cp.ChildProcess, options: ExecutionOptions, cmd: string) {
const timeout = options.timeout;

@@ -23,3 +23,3 @@

if (!result.valid) {
reject(result);
reject(new BaseError(`Error executing ${cmd}: ${result.message || 'failed'}`, result));
} else {

@@ -72,3 +72,3 @@ resolve(result);

const p = cp.spawn(cmd, args, { shell: true, ...(options as cp.SpawnOptions) });
return [p, enhanceProcess(p, options)];
return [p, enhanceProcess(p, options, cmdStr)];
}

@@ -79,3 +79,3 @@

const p = cp.fork(cmd, args, options);
return [p, enhanceProcess(p, options)];
return [p, enhanceProcess(p, options, cmdStr)];
}

@@ -85,3 +85,3 @@

const p = cp.exec(cmd, options);
return [p, enhanceProcess(p, options)];
return [p, enhanceProcess(p, options, cmd)];
}

@@ -88,0 +88,0 @@