Skip to content

Commit 6b779f8

Browse files
committed
test: remove hard coding path
test-child-process-any-shell uses `where` before testing with bash to remove hard coding path.
1 parent a22b2da commit 6b779f8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ const test = (shell) => {
1818

1919
test('cmd');
2020
test('cmd.exe');
21-
test('C:\\WINDOWS\\system32\\cmd.exe');
2221
test('powershell');
23-
test('C:\\Program Files\\Git\\bin\\bash.exe');
22+
cp.exec('where bash', (error, stdout) => {
23+
if (error) {
24+
return;
25+
}
26+
test(stdout.trim());
27+
});

0 commit comments

Comments
 (0)