Browse Source

fix(nsis): check main binary name is not empty (#11000)

* Check main binary name is not empty

* Missing !=
Tony 10 tháng trước cách đây
mục cha
commit
def875193a

+ 2 - 1
crates/tauri-bundler/src/bundle/windows/templates/installer.nsi

@@ -638,7 +638,8 @@ Section Install
 
   ; Remove old main binary if it doesn't match new main binary name
   ReadRegStr $0 SHCTX "${UNINSTKEY}" "MainBinaryName"
-  ${If} $0 != "${MAINBINARYNAME}.exe"
+  ${If} $0 != ""
+  ${AndIf} $0 != "${MAINBINARYNAME}.exe"
     Delete "$INSTDIR\$0"
   ${EndIf}