Skip to content

Commit

Permalink
test: make a test path-independent
Browse files Browse the repository at this point in the history
parallel/test-spawn-cmd-named-pipe.js failed with spaces
both in node.exe and test paths.

PR-URL: #12945
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
  • Loading branch information
vsemozhetbyt committed May 12, 2017
1 parent 1541079 commit 529e4f2
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions test/parallel/test-spawn-cmd-named-pipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,10 @@ if (!process.argv[2]) {
});
stdoutPipeServer.listen(stdoutPipeName);

const comspec = process.env['comspec'];
if (!comspec || comspec.length === 0) {
assert.fail('Failed to get COMSPEC');
}
const args =
[`"${__filename}"`, 'child', '<', stdinPipeName, '>', stdoutPipeName];

const args = ['/c', process.execPath, __filename, 'child',
'<', stdinPipeName, '>', stdoutPipeName];

const child = spawn(comspec, args);
const child = spawn(`"${process.execPath}"`, args, { shell: true });

child.on('exit', common.mustCall(function(exitCode) {
stdinPipeServer.close();
Expand Down

0 comments on commit 529e4f2

Please sign in to comment.