From 971aad1b132a5ec37216c0d755d3ea59afc63812 Mon Sep 17 00:00:00 2001 From: Randal Hanford Date: Fri, 6 Oct 2017 10:51:12 -0700 Subject: [PATCH] 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 Reviewed-By: Luigi Pinca --- test/common/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/common/index.js b/test/common/index.js index 278f9f6a78..05f21e25ca 100644 --- a/test/common/index.js +++ b/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`; exports.PIPE = pipePrefix + pipeName; }