Skip to content

Commit 536c0cd

Browse files
authored
fix(cta): filter out empty args, fixes #3393 (#3396)
* fix(cta): filter out empty args, fixes #3393 * use strict inequality [skip ci]
1 parent 5c0a8bf commit 536c0cd

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

.changes/cta-crash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-tauri-app": patch
3+
---
4+
5+
Fix `create-tauri-app` failing to bootstrap projects.

tooling/create-tauri-app/src/shell.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ export const shell = async (
2222
})
2323
} else {
2424
if (log) console.log(`[running]: ${command}`)
25-
return await execa(command, args, {
26-
stdio: 'inherit',
27-
cwd: process.cwd(),
28-
env: process.env,
29-
...options
30-
})
25+
return await execa(
26+
command,
27+
args.filter((e) => e !== ''),
28+
{
29+
stdio: 'inherit',
30+
cwd: process.cwd(),
31+
env: process.env,
32+
...options
33+
}
34+
)
3135
}
3236
} catch (error) {
3337
console.error('Error with command: %s', command)

0 commit comments

Comments
 (0)