Skip to content

Commit

Permalink
test: use relative path in pipePrefix
Browse files Browse the repository at this point in the history
Modified pipePrefix to use relative path on windows,
previously tests failed when the full path was 120+ characters

PR-URL: nodejs#15988
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
rhanford authored and joyeecheung committed Oct 14, 2017
1 parent 4826ac5 commit 971aad1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`;
exports.PIPE = pipePrefix + pipeName;
}
Expand Down

0 comments on commit 971aad1

Please sign in to comment.