From 02cdfdf6466eecf4657d65defa76119bc80dcbcd Mon Sep 17 00:00:00 2001 From: liusong1111 Date: Fri, 10 Jul 2020 19:03:12 +0800 Subject: [PATCH] fix: check `CheckNetIsolation LoopbackExempt -s` output should ignore utf8 chars instead of panic (#798) --- cli/tauri-bundler/src/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cli/tauri-bundler/src/main.rs b/cli/tauri-bundler/src/main.rs index db2b587e2..94a378955 100644 --- a/cli/tauri-bundler/src/main.rs +++ b/cli/tauri-bundler/src/main.rs @@ -118,9 +118,7 @@ fn run() -> crate::Result<()> { panic!("Failed to execute CheckNetIsolation LoopbackExempt -s"); } - let output_str = String::from_utf8(exempt_output.stdout) - .map_err(|_| anyhow::anyhow!("failed to convert LoopbackExempt output to String"))? - .to_lowercase(); + let output_str = String::from_utf8_lossy(&exempt_output.stdout).to_lowercase(); if !output_str.contains("win32webviewhost_cw5n1h2txyewy") { println!("Running Loopback command"); Command::new("powershell")