Kaynağa Gözat

fix(cli.rs): ensure `target/release/wix` exists, closes #2927 (#2987)

Amr Bashir 3 yıl önce
ebeveyn
işleme
17a1ad6823

+ 5 - 0
.changes/cli.rs-wix-license.md

@@ -0,0 +1,5 @@
+---
+"cli.rs": patch
+---
+
+Fix `tauri build` failing on Windows if `tauri.conf.json > tauri > bundle > Windows > wix > license` is used.

+ 3 - 0
tooling/bundler/src/bundle/windows/msi/wix.rs

@@ -407,6 +407,9 @@ pub fn build_wix_app_installer(
     )?;
   }
 
+  // ensure that `target/{release, debug}/wix` folder exists
+  std::fs::create_dir_all(settings.project_out_directory().join("wix"))?;
+
   let output_path = settings.project_out_directory().join("wix").join(arch);
 
   let mut data = BTreeMap::new();