Browse Source

fix(bundler): unset `NSISDIR` and `NSISCONFDIR` when running `makensis` (#8376)

closes #8359
Amr Bashir 1 year ago
parent
commit
777ddf434a
2 changed files with 7 additions and 0 deletions
  1. 5 0
      .changes/bundler-nsis-nsisdir.md
  2. 2 0
      tooling/bundler/src/bundle/windows/nsis.rs

+ 5 - 0
.changes/bundler-nsis-nsisdir.md

@@ -0,0 +1,5 @@
+---
+'tauri-bundler': 'patch:bug'
+---
+
+Unset `NSISDIR` and `NSISCONFDIR` when running `makensis.exe` so it doesn't conflict with NSIS installed by the user.

+ 2 - 0
tooling/bundler/src/bundle/windows/nsis.rs

@@ -457,6 +457,8 @@ fn build_nsis_app_installer(
       _ => "-V4",
     })
     .arg(installer_nsi_path)
+    .env_remove("NSISDIR")
+    .env_remove("NSISCONFDIR")
     .current_dir(output_path)
     .piped()
     .context("error running makensis.exe")?;