mirror of
https://github.com/shelljs/shelljs.git
synced 2026-01-18 16:03:37 +00:00
test: make a test more forgiving for systems with non-standard bash and sh paths (#1144)
Made a test more forgiving so it passes on systems that have non-standard `bash` and `sh` binary paths.
This commit is contained in:
parent
78ed036573
commit
85dd4729dd
@ -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`);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user