Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup! test: do not assume process.execPath contains no spaces
  • Loading branch information
aduh95 committed Sep 20, 2024
commit 2ea4fa072621b7ecc795070f812b80bd3bd331ee
3 changes: 2 additions & 1 deletion test/sequential/test-cli-syntax-file-not-found.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ const fixtures = require('../common/fixtures');
// The execPath might contain chars that should be escaped in a shell context.
// On non-Windows, we can pass the path via the env; `"` is not a valid char on
// Windows, so we can simply pass the path.
const execNode = (flag, file) => exec(
const execNode = (flag, file, callback) => exec(
`"${common.isWindows ? process.execPath : '$NODE'}" ${flag} "${common.isWindows ? file : '$FILE'}"`,
common.isWindows ? undefined : { env: { ...process.env, NODE: process.execPath, FILE: file } },
callback,
);

// Test both sets of arguments that check syntax
Expand Down
3 changes: 2 additions & 1 deletion test/sequential/test-cli-syntax-good.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ const fixtures = require('../common/fixtures');
// The execPath might contain chars that should be escaped in a shell context.
// On non-Windows, we can pass the path via the env; `"` is not a valid char on
// Windows, so we can simply pass the path.
const execNode = (flag, file) => exec(
const execNode = (flag, file, callback) => exec(
`"${common.isWindows ? process.execPath : '$NODE'}" ${flag} "${common.isWindows ? file : '$FILE'}"`,
common.isWindows ? undefined : { env: { ...process.env, NODE: process.execPath, FILE: file } },
callback,
);

// Test both sets of arguments that check syntax
Expand Down