fix(bundler): remove unused code

This commit is contained in:
Noah Klayman 2021-02-11 21:25:12 -08:00
parent 7364f97d24
commit 8f5188c8a2
No known key found for this signature in database
GPG Key ID: BF1CE16C2D4EF62C
2 changed files with 18 additions and 22 deletions

View File

@ -65,27 +65,25 @@ pub fn bundle_project(settings: Settings) -> crate::Result<Vec<PathBuf>> {
#[cfg(windows)]
{
if let Ok(tauri_config) = get_tauri_config() {
let exempt_output = Command::new("CheckNetIsolation")
.args(&vec!["LoopbackExempt", "-s"])
.output()
.expect("failed to read LoopbackExempt -s");
let exempt_output = Command::new("CheckNetIsolation")
.args(&vec!["LoopbackExempt", "-s"])
.output()
.expect("failed to read LoopbackExempt -s");
if !exempt_output.status.success() {
panic!("Failed to execute CheckNetIsolation LoopbackExempt -s");
}
if !exempt_output.status.success() {
panic!("Failed to execute CheckNetIsolation LoopbackExempt -s");
}
let output_str = String::from_utf8_lossy(&exempt_output.stdout).to_lowercase();
if !output_str.contains("win32webviewhost_cw5n1h2txyewy") {
println!("Running Loopback command");
runas::Command::new("powershell")
.args(&[
"CheckNetIsolation LoopbackExempt -a -n=\"Microsoft.Win32WebViewHost_cw5n1h2txyewy\"",
])
.force_prompt(true)
.status()
.expect("failed to run Loopback command");
}
let output_str = String::from_utf8_lossy(&exempt_output.stdout).to_lowercase();
if !output_str.contains("win32webviewhost_cw5n1h2txyewy") {
println!("Running Loopback command");
runas::Command::new("powershell")
.args(&[
"CheckNetIsolation LoopbackExempt -a -n=\"Microsoft.Win32WebViewHost_cw5n1h2txyewy\"",
])
.force_prompt(true)
.status()
.expect("failed to run Loopback command");
}
}

View File

@ -449,9 +449,7 @@ pub fn build_wix_app_installer(
let mut data = BTreeMap::new();
if let Ok(tauri_config) = crate::bundle::tauri_config::get() {
data.insert("embedded_server", to_json(true));
}
data.insert("embedded_server", to_json(true));
data.insert("product_name", to_json(settings.bundle_name()));
data.insert("version", to_json(settings.version_string()));