Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
8d03561762 | |||
f516a6e753 | |||
1c4f6a8bf9 | |||
4fe3775904 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@pushrocks/smartshell",
|
||||
"version": "2.0.7",
|
||||
"version": "2.0.9",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@pushrocks/smartshell",
|
||||
"private": false,
|
||||
"version": "2.0.7",
|
||||
"version": "2.0.9",
|
||||
"description": "shell actions designed as promises",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
|
@ -19,7 +19,7 @@ export class ShellLog {
|
||||
}
|
||||
return dataArg;
|
||||
})();
|
||||
console.log(dataString);
|
||||
process.stdout.write(dataString);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -21,6 +21,7 @@ export interface IExecResult {
|
||||
export interface IExecResultStreaming {
|
||||
childProcess: cp.ChildProcess;
|
||||
finalPromise: Promise<IExecResult>;
|
||||
kill: () => void;
|
||||
}
|
||||
|
||||
// -- SmartShell --
|
||||
@ -70,7 +71,11 @@ export class Smartshell {
|
||||
if (streamingArg) {
|
||||
done.resolve({
|
||||
childProcess: execChildProcess,
|
||||
finalPromise: childProcessEnded.promise
|
||||
finalPromise: childProcessEnded.promise,
|
||||
kill: () => {
|
||||
// this notation with the - kills the whole process group
|
||||
process.kill(-execChildProcess.pid);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user