Skip to content

Commit d0709fe

Browse files
author
Luca Forstner
committed
No arg splitting
1 parent 78b8cce commit d0709fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/e2e-tests/run.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,11 @@ const recipeResults = recipePaths.map(recipePath => {
126126

127127
if (recipe.buildCommand) {
128128
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, {
131130
cwd: path.dirname(recipePath),
132131
encoding: 'utf8',
133132
stdio: 'inherit',
133+
shell: true, // needed so we can pass the build command in as whole without splitting it up into args
134134
});
135135

136136
if (buildCommandProcess.status !== 0) {
@@ -148,12 +148,12 @@ const recipeResults = recipePaths.map(recipePath => {
148148
`Running E2E test command for test application "${recipe.testApplicationName}", test "${test.testName}"`,
149149
);
150150

151-
const [testCommand, ...testCommandArgs] = test.testCommand.split(' ');
152-
const testProcessResult = childProcess.spawnSync(testCommand, testCommandArgs, {
151+
const testProcessResult = childProcess.spawnSync(test.testCommand, {
153152
cwd: path.dirname(recipePath),
154153
timeout: (test.timeoutSeconds ?? DEFAULT_TEST_TIMEOUT_SECONDS) * 1000,
155154
encoding: 'utf8',
156155
stdio: 'pipe',
156+
shell: true, // needed so we can pass the test command in as whole without splitting it up into args
157157
});
158158

159159
console.log(testProcessResult.stdout.replace(/^/gm, '[TEST OUTPUT] '));

0 commit comments

Comments
 (0)