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: #15988
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
rhanford authored and targos committed Oct 18, 2017
1 parent fa836fc commit 8173b0c
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 8173b0c

Please sign in to comment.