瀏覽代碼

fix(cta): account for null args

amrbashir 3 年之前
父節點
當前提交
e25fc68da6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tooling/create-tauri-app/src/shell.ts

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

@@ -24,7 +24,7 @@ export const shell = async (
       if (log) console.log(`[running]: ${command}`)
       return await execa(
         command,
-        args.filter((e) => e !== ''),
+        (args ?? []).filter((e) => e !== ''),
         {
           stdio: 'inherit',
           cwd: process.cwd(),