Merge pull request #989 from napi-rs/fix/spwan-arg

fix(cli): shell: true instead of bash
This commit is contained in:
LongYinan 2022-01-03 21:27:55 +08:00 committed by GitHub
commit 671ac80e8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ export function spawn(
const [cmd, ...args] = command.split(' ').map((s) => s.trim())
debug(`execute ${cmd} ${args.join(' ')}`)
return new Promise((resolve, reject) => {
const spawnStream = _spawn(cmd, args, { ...options, shell: 'bash' })
const spawnStream = _spawn(cmd, args, { ...options, shell: true })
const chunks: Buffer[] = []
process.stdin.pipe(spawnStream.stdin)
spawnStream.stdout?.on('data', (chunk) => {