Browse Source

test: use relative path in pipePrefix

Modified pipePrefix to use relative path on windows,
previously tests failed when the full path was 120+ characters

PR-URL: https://github.com/nodejs/node/pull/15988
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v9.x-staging
Randal Hanford 7 years ago
committed by Joyee Cheung
parent
commit
971aad1b13
  1. 3
      test/common/index.js

3
test/common/index.js

@ -258,7 +258,8 @@ Object.defineProperty(exports, 'hasFipsCrypto', {
}); });
{ {
const pipePrefix = exports.isWindows ? '\\\\.\\pipe\\' : `${exports.tmpDir}/`; const localRelative = path.relative(process.cwd(), `${exports.tmpDir}/`);
const pipePrefix = exports.isWindows ? '\\\\.\\pipe\\' : localRelative;
const pipeName = `node-test.${process.pid}.sock`; const pipeName = `node-test.${process.pid}.sock`;
exports.PIPE = pipePrefix + pipeName; exports.PIPE = pipePrefix + pipeName;
} }

Loading…
Cancel
Save