mirror of
https://github.com/nodejs/node.git
synced 2024-11-24 20:29:23 +01:00
test: escape script filename on Windows
Escape backslashes in script filename on Windows in a CLI test. PR-URL: https://github.com/nodejs/node/pull/16124 Fixes: https://github.com/nodejs/node/issues/16057 and #16023 Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
00fe76d2df
commit
07ec10d43b
@ -139,7 +139,10 @@ child.exec(`${nodejs} --use-strict -p process.execArgv`,
|
||||
|
||||
// Regression test for https://github.com/nodejs/node/issues/3574.
|
||||
{
|
||||
const emptyFile = fixtures.path('empty.js');
|
||||
let emptyFile = fixtures.path('empty.js');
|
||||
if (common.isWindows) {
|
||||
emptyFile = emptyFile.replace(/\\/g, '\\\\');
|
||||
}
|
||||
|
||||
child.exec(`${nodejs} -e 'require("child_process").fork("${emptyFile}")'`,
|
||||
common.mustCall((err, stdout, stderr) => {
|
||||
|
Loading…
Reference in New Issue
Block a user