Skip to content
Myr

fix support for the `shell` option in `execa.shell()`

Before adoption: this commit came in with the history the project adopted, so no landing records it.

fixes #54

authored by Sindre Sorhus · committed by Sindre Sorhus · parent 037bfb4 · Browse files · 2 files+8 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−0 removed

  • other:+8 added−0 removed

2 files+8 added−0 removed

modified:index.js+1 added
91 unmodified lines
92 }9394 if (opts.shell) {95 file = opts.shell;96 delete opts.shell;97 }9899 return fn(file, args, opts);100}
165 unmodified lines
modified:test.js+7 added
316 unmodified lines
317 // On Windows the subprocesses are actually always killed318 test('cleanup false - SIGINT', spawnAndKill, 'SIGTERM', false);319 test('cleanup false - SIGKILL', spawnAndKill, 'SIGKILL', false);320}321322test('execa.shell() supports the `shell` option', async t => {323 const {stdout} = await m.shell('noop foo', {324 shell: process.platform === 'win32' ? 'cmd.exe' : '/bin/bash'325 });326 t.is(stdout, 'foo');327});