Browse Source

fix(cta): fix cli install with other deps, fixes #3417 (#3420)

* fix(cta): fix cli install with other deps, fixes #3417
Amr Bashir 3 năm trước cách đây
mục cha
commit
c01036043d

+ 5 - 0
.changes/cta-cli-install.md

@@ -0,0 +1,5 @@
+---
+"create-tauri-app": patch
+---
+
+Fix crash when using `create-react-app` recipe.

+ 2 - 2
tooling/create-tauri-app/src/dependency-manager.ts

@@ -83,7 +83,7 @@ async function installNpmDevPackage(
       case 'yarn':
         await shell(
           packageManager,
-          ['add', '-D', '--ignore-scripts', packageNames.join(' ')],
+          ['add', '-D', '--ignore-scripts', ...packages],
           {
             cwd: appDir
           }
@@ -92,7 +92,7 @@ async function installNpmDevPackage(
       case 'npm':
         await shell(
           'npm',
-          ['install', '--save-dev', '--ignore-scripts', packageNames.join(' ')],
+          ['install', '--save-dev', '--ignore-scripts', ...packages],
           {
             cwd: appDir
           }