mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: use symlinks to copy shells
Git for Windows includes `C:\Program Files\Git\bin\bash.exe`, which spawns ..\usr\bin\bash.exe, so copying that executable won't work. However, if a symlink is used to test paths with spaces, this executable will still work. PR-URL: https://github.com/nodejs/node/pull/32129 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
This commit is contained in:
parent
38bf1beea9
commit
8866ff5ab1
@ -23,10 +23,10 @@ const test = (shell) => {
|
||||
}));
|
||||
};
|
||||
const testCopy = (shellName, shellPath) => {
|
||||
// Copy the executable to a path with spaces, to ensure there are no issues
|
||||
// Symlink the executable to a path with spaces, to ensure there are no issues
|
||||
// related to quoting of argv0
|
||||
const copyPath = `${tmpPath}\\${shellName}`;
|
||||
fs.copyFileSync(shellPath, copyPath);
|
||||
fs.symlinkSync(shellPath, copyPath);
|
||||
test(copyPath);
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user