Skip to content

Commit cc2df6c

Browse files
committed
test: skip Microsoft Store bash alias on Windows
The Microsoft Store bash.exe is an app execution alias that cannot be stat'ed or symlinked, causing EACCES on GitHub Actions Windows runners. Skip it when iterating over the shells returned by `where bash`. Assisted-by: pi Signed-off-by: Matteo Collina <matteo.collina@gmail.com>
1 parent 01353b7 commit cc2df6c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎test/parallel/test-child-process-exec-any-shells-windows.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ cp.exec('where bash', common.mustCall((error, stdout) => {
6161
const lines = stdout.trim().split(/[\r\n]+/g);
6262
for (let i = 0; i < lines.length; ++i) {
6363
const bashPath = lines[i].trim();
64+
// The Microsoft Store bash.exe is an app execution alias that cannot be
65+
// stat'ed or symlinked (EACCES on GitHub Actions runners). Skip it.
66+
if (bashPath.toLowerCase().includes('\\microsoft\\windowsapps\\'))
67+
continue;
6468
test(bashPath);
6569
testCopy(`bash_${i}.exe`, bashPath);
6670
}

0 commit comments

Comments
 (0)