try with sudo

pull/2060/head
amrbashir 6 months ago
parent 719cd9398e
commit c61b224564
No known key found for this signature in database
GPG Key ID: BBD7A47A2003FF33

@ -0,0 +1,5 @@
[target.'cfg(windows)']
runner = "powershell -Command Start-Process -Verb runAs -FilePath"
[target.x86_64-unknown-linux-gnu]
runner = 'sudo -E'

@ -27,9 +27,7 @@ fn main() {
let exe = tauri::utils::platform::current_exe().unwrap();
let dir = dunce::simplified(exe.parent().unwrap()).display();
if target == "nsis" {
builder = builder
.installer_arg("/NS")
.installer_arg(format!("/D=\"{dir}\"",));
builder = builder.installer_arg(format!("/D=\"{dir}\"",));
} else if target == "msi" {
builder = builder.installer_arg(format!("INSTALLDIR=\"{dir}\""));
}

@ -200,7 +200,7 @@ fn nsis() {
test_update(&app, update_bundle, signature, "nsis");
// cleanup the installed application
if std::env::var("CI").map(|v| v == "true").unwrap_or_default() {
if !std::env::var("CI").map(|v| v == "true").unwrap_or_default() {
let _ = Command::new(target_dir.join("debug/uninstall.exe"))
.arg("/S")
.status()
@ -230,7 +230,7 @@ fn msi() {
test_update(&app, update_bundle, signature, "msi");
// cleanup the installed application
if std::env::var("CI").map(|v| v == "true").unwrap_or_default() {
if !std::env::var("CI").map(|v| v == "true").unwrap_or_default() {
let uninstall = target_dir.join("debug/Uninstall app-updater.lnk");
let _ = Command::new("cmd")
.arg("/c")

Loading…
Cancel
Save