Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: make a test path-independent
parallel/test-spawn-cmd-named-pipe.js failed with spaces
both in node.exe and test paths.
  • Loading branch information
vsemozhetbyt committed May 10, 2017
commit e597b392c2e59db609fb1e43bbaac20c3ada102d
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