Răsfoiți Sursa

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

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

* use strict inequality [skip ci]
Amr Bashir 3 ani în urmă
părinte
comite
536c0cd7d4
2 a modificat fișierele cu 15 adăugiri și 6 ștergeri
  1. 5 0
      .changes/cta-crash.md
  2. 10 6
      tooling/create-tauri-app/src/shell.ts

+ 5 - 0
.changes/cta-crash.md

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

+ 10 - 6
tooling/create-tauri-app/src/shell.ts

@@ -22,12 +22,16 @@ export const shell = async (
       })
     } else {
       if (log) console.log(`[running]: ${command}`)
-      return await execa(command, args, {
-        stdio: 'inherit',
-        cwd: process.cwd(),
-        env: process.env,
-        ...options
-      })
+      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)