mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-06-06 13:53:54 +02:00
try with sudo
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user