From 544328d5a304979b92e542e6bacdb539e9e8fbdc Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Thu, 26 Sep 2024 04:53:05 +0300 Subject: [PATCH] fix(nsis): properly handle Webview2 download return value (#11139) port of #11131 to 2.x --- .changes/bundler-nsis-webview2-success.md | 5 +++++ crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/bundler-nsis-webview2-success.md diff --git a/.changes/bundler-nsis-webview2-success.md b/.changes/bundler-nsis-webview2-success.md new file mode 100644 index 000000000000..68a538a79892 --- /dev/null +++ b/.changes/bundler-nsis-webview2-success.md @@ -0,0 +1,5 @@ +--- +"tauri-bundler": "patch:bug" +--- + +Fix NSIS installer failing to determine whether webview installer downloaded correctly or not. diff --git a/crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi b/crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi index a03cee5e4f33..5270de2ad04c 100644 --- a/crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi +++ b/crates/tauri-bundler/src/bundle/windows/nsis/installer.nsi @@ -541,7 +541,7 @@ Section WebView2 DetailPrint "$(webview2Downloading)" NSISdl::download "https://go.microsoft.com/fwlink/p/?LinkId=2124703" "$TEMP\MicrosoftEdgeWebview2Setup.exe" Pop $0 - ${If} $0 = 0 + ${If} $0 == "success" DetailPrint "$(webview2DownloadSuccess)" ${Else} DetailPrint "$(webview2DownloadError)"