Compare commits

..

4 Commits

Author SHA1 Message Date
8d03561762 2.0.9 2018-11-26 17:45:59 +01:00
f516a6e753 fix(core): update 2018-11-26 17:45:58 +01:00
1c4f6a8bf9 2.0.8 2018-10-28 19:18:42 +01:00
4fe3775904 fix(child processes): now run detached 2018-10-28 19:18:42 +01:00
4 changed files with 9 additions and 4 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "@pushrocks/smartshell",
"version": "2.0.7",
"version": "2.0.9",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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",

View File

@ -19,7 +19,7 @@ export class ShellLog {
}
return dataArg;
})();
console.log(dataString);
process.stdout.write(dataString);
}
/**

View File

@ -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);
}
});
}