@@ -31,7 +31,7 @@ export const createProcess = (workspace: ProjectWorkspace, args: string[]): Chil
31
31
const env = { ...process . env , ...( workspace . nodeEnv ?? { } ) } ;
32
32
const cmd = runtimeExecutable . join ( ' ' ) ;
33
33
34
- const spawnShell = ( ) => {
34
+ const spawnCommandLine = ( ) => {
35
35
const spawnOptions = {
36
36
cwd : workspace . rootPath ,
37
37
env,
@@ -50,7 +50,7 @@ export const createProcess = (workspace: ProjectWorkspace, args: string[]): Chil
50
50
return spawn ( cmd , [ ] , spawnOptions ) ;
51
51
} ;
52
52
53
- const spawnLoginShell = ( tShell : LoginShell ) => {
53
+ const spawnLoginShell = ( shell : LoginShell ) => {
54
54
const spawnOptions = {
55
55
cwd : workspace . rootPath ,
56
56
env,
@@ -60,14 +60,14 @@ export const createProcess = (workspace: ProjectWorkspace, args: string[]): Chil
60
60
if ( workspace . debug ) {
61
61
// eslint-disable-next-line no-console
62
62
console . log (
63
- `spawning login-shell "${ tShell . path } ${ tShell . args . join ( ' ' ) } " for command=${ cmd } ` ,
63
+ `spawning login-shell "${ shell . path } ${ shell . args . join ( ' ' ) } " for command=${ cmd } ` ,
64
64
'options:' ,
65
65
spawnOptions
66
66
) ;
67
67
}
68
68
69
- const child = spawn ( tShell . path , tShell . args , spawnOptions ) ;
70
- child . stdin . write ( `${ cmd } \n exit \n` ) ;
69
+ const child = spawn ( shell . path , shell . args , spawnOptions ) ;
70
+ child . stdin . write ( `${ cmd } \nexit $? \n` ) ;
71
71
return child ;
72
72
} ;
73
73
@@ -78,5 +78,5 @@ export const createProcess = (workspace: ProjectWorkspace, args: string[]): Chil
78
78
return spawnLoginShell ( workspace . shell ) ;
79
79
}
80
80
}
81
- return spawnShell ( ) ;
81
+ return spawnCommandLine ( ) ;
82
82
} ;
0 commit comments