@@ -126,11 +126,11 @@ const recipeResults = recipePaths.map(recipePath => {
126
126
127
127
if ( recipe . buildCommand ) {
128
128
console . log ( `Running E2E test build command for test application "${ recipe . testApplicationName } "` ) ;
129
- const [ buildCommand , ...buildCommandArgs ] = recipe . buildCommand . split ( ' ' ) ;
130
- const buildCommandProcess = childProcess . spawnSync ( buildCommand , buildCommandArgs , {
129
+ const buildCommandProcess = childProcess . spawnSync ( recipe . buildCommand , {
131
130
cwd : path . dirname ( recipePath ) ,
132
131
encoding : 'utf8' ,
133
132
stdio : 'inherit' ,
133
+ shell : true , // needed so we can pass the build command in as whole without splitting it up into args
134
134
} ) ;
135
135
136
136
if ( buildCommandProcess . status !== 0 ) {
@@ -148,12 +148,12 @@ const recipeResults = recipePaths.map(recipePath => {
148
148
`Running E2E test command for test application "${ recipe . testApplicationName } ", test "${ test . testName } "` ,
149
149
) ;
150
150
151
- const [ testCommand , ...testCommandArgs ] = test . testCommand . split ( ' ' ) ;
152
- const testProcessResult = childProcess . spawnSync ( testCommand , testCommandArgs , {
151
+ const testProcessResult = childProcess . spawnSync ( test . testCommand , {
153
152
cwd : path . dirname ( recipePath ) ,
154
153
timeout : ( test . timeoutSeconds ?? DEFAULT_TEST_TIMEOUT_SECONDS ) * 1000 ,
155
154
encoding : 'utf8' ,
156
155
stdio : 'pipe' ,
156
+ shell : true , // needed so we can pass the test command in as whole without splitting it up into args
157
157
} ) ;
158
158
159
159
console . log ( testProcessResult . stdout . replace ( / ^ / gm, '[TEST OUTPUT] ' ) ) ;
0 commit comments