Skip to content

Commit

Permalink
test: skip testing exec on wsl bash
Browse files Browse the repository at this point in the history
  • Loading branch information
H4ad committed Nov 5, 2023
1 parent 83ae06f commit 85b0a66
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/parallel/test-child-process-exec-any-shells-windows.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,22 @@ fs.writeFile(`${tmpPath}\\test file`, 'Test', common.mustSucceed(() => {
}));
}));

// Test Bash (from WSL and Git), if available
const skipPaths = [
// Skip bash from WSL because of

Check failure on line 57 in test/parallel/test-child-process-exec-any-shells-windows.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Trailing spaces not allowed
// https://github.com/nodejs/node/pull/50519#issuecomment-1791806986
'usr\\bin\\bash.exe',
];

// Test Bash (Git), if available
cp.exec('where bash', common.mustCall((error, stdout) => {
if (error) {
return;
}
const lines = stdout.trim().split(/[\r\n]+/g);
for (let i = 0; i < lines.length; ++i) {
const bashPath = lines[i].trim();
if (skipPaths.some(path => path.endsWith(bashPath)))

Check failure on line 70 in test/parallel/test-child-process-exec-any-shells-windows.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

Expected parentheses around arrow function argument
continue;
test(bashPath);
testCopy(`bash_${i}.exe`, bashPath);
}
Expand Down

0 comments on commit 85b0a66

Please sign in to comment.