fix(core): update
This commit is contained in:
@ -31,7 +31,7 @@ export class ShellEnv {
|
||||
/**
|
||||
* imports path into the shell from env if available and returns it with
|
||||
*/
|
||||
private _setPath(commandStringArg): string {
|
||||
private _setPath(commandStringArg: string): string {
|
||||
let commandResult = commandStringArg;
|
||||
let commandPaths: string[] = [];
|
||||
commandPaths = commandPaths.concat(process.env.PATH.split(':'));
|
||||
@ -41,7 +41,7 @@ export class ShellEnv {
|
||||
|
||||
// lets filter for unwanted paths
|
||||
// Windows WSL
|
||||
commandPaths = commandPaths.filter(commandPathArg => {
|
||||
commandPaths = commandPaths.filter((commandPathArg) => {
|
||||
const filterResult =
|
||||
!commandPathArg.startsWith('/mnt/c/') &&
|
||||
!commandPathArg.startsWith('Files/1E') &&
|
||||
|
@ -71,18 +71,6 @@ export class Smartshell {
|
||||
spawnlogInstance.addToBuffer(data);
|
||||
});
|
||||
|
||||
if (streamingArg) {
|
||||
done.resolve({
|
||||
childProcess: execChildProcess,
|
||||
finalPromise: childProcessEnded.promise,
|
||||
kill: () => {
|
||||
// this notation with the - kills the whole process group
|
||||
console.log(`running tree kill on process ${execChildProcess.pid}`);
|
||||
plugins.treeKill(execChildProcess.pid);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
execChildProcess.on('exit', (code, signal) => {
|
||||
this.smartexit.removeProcess(execChildProcess);
|
||||
if (strictArg && code === 1) {
|
||||
@ -100,6 +88,18 @@ export class Smartshell {
|
||||
childProcessEnded.resolve(execResult);
|
||||
});
|
||||
|
||||
if (streamingArg) {
|
||||
done.resolve({
|
||||
childProcess: execChildProcess,
|
||||
finalPromise: childProcessEnded.promise,
|
||||
kill: () => {
|
||||
// this notation with the - kills the whole process group
|
||||
console.log(`running tree kill on process ${execChildProcess.pid}`);
|
||||
plugins.treeKill(execChildProcess.pid);
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
const result = await done.promise;
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user