fix(cta): filter out empty args, fixes #3393 (#3396)

* fix(cta): filter out empty args, fixes #3393

* use strict inequality [skip ci]
This commit is contained in:
Amr Bashir 2022-02-11 10:31:29 +02:00 committed by GitHub
parent 5c0a8bfef7
commit 536c0cd7d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 6 deletions

5
.changes/cta-crash.md Normal file
View File

@ -0,0 +1,5 @@
---
"create-tauri-app": patch
---
Fix `create-tauri-app` failing to bootstrap projects.

View File

@ -22,12 +22,16 @@ export const shell = async (
})
} else {
if (log) console.log(`[running]: ${command}`)
return await execa(command, args, {
return await execa(
command,
args.filter((e) => e !== ''),
{
stdio: 'inherit',
cwd: process.cwd(),
env: process.env,
...options
})
}
)
}
} catch (error) {
console.error('Error with command: %s', command)