Skip to content

Commit

Permalink
test: make a test more forgiving for systems with non-standard bash a…
Browse files Browse the repository at this point in the history
…nd sh paths (#1144)

Made a test
more forgiving so it passes on systems that have non-standard `bash` and
`sh` binary paths.
  • Loading branch information
skeet70 committed Dec 7, 2023
1 parent 78ed036 commit 85dd472
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/exec.js
Expand Up @@ -178,10 +178,10 @@ test('set shell option (TODO: add tests for Windows)', t => {
t.is(result.stdout, '/bin/sh\n'); // sh by default
const bashPath = shell.which('bash').trim();
if (bashPath) {
result = shell.exec('echo $0', { shell: '/bin/bash' });
result = shell.exec('echo $0', { shell: bashPath });
t.falsy(shell.error());
t.is(result.code, 0);
t.is(result.stdout, '/bin/bash\n');
t.is(result.stdout, `${bashPath}\n`);
}
});
});
Expand Down

0 comments on commit 85dd472

Please sign in to comment.