Skip to content
Permalink
Browse files

test: make a test path-independent

parallel/test-spawn-cmd-named-pipe.js failed with spaces
both in node.exe and test paths.

PR-URL: #12945
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
  • Loading branch information...
vsemozhetbyt committed May 10, 2017
1 parent 1541079 commit 529e4f206aa16e53e19a6f03b3bfc5f07268149e
Showing with 3 additions and 8 deletions.
  1. +3 −8 test/parallel/test-spawn-cmd-named-pipe.js
@@ -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();

0 comments on commit 529e4f2

Please sign in to comment.
You can’t perform that action at this time.