diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index e95e7b6f..d012277c 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -793,7 +793,6 @@ dependencies = [ "args", "cc", "ctrlc", - "duct", "file_diff", "futures-util", "getopts", @@ -1016,18 +1015,6 @@ dependencies = [ "dtoa", ] -[[package]] -name = "duct" -version = "0.13.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fc6a0a59ed0888e0041cf708e66357b7ae1a82f1c67247e1f93b5e0818f7d8d" -dependencies = [ - "libc", - "once_cell", - "os_pipe 0.9.2", - "shared_child 0.3.5", -] - [[package]] name = "either" version = "1.7.0" @@ -2624,16 +2611,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "os_pipe" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb233f06c2307e1f5ce2ecad9f8121cffbbee2c95428f44ea85222e460d0d213" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "os_pipe" version = "1.0.1" @@ -3779,16 +3756,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shared_child" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6be9f7d5565b1483af3e72975e2dee33879b3b86bd48c0929fccf6585d79e65a" -dependencies = [ - "libc", - "winapi", -] - [[package]] name = "shared_child" version = "1.0.0" @@ -4121,7 +4088,7 @@ dependencies = [ "once_cell", "open", "os_info", - "os_pipe 1.0.1", + "os_pipe", "percent-encoding", "rand 0.8.5", "raw-window-handle", @@ -4132,7 +4099,7 @@ dependencies = [ "serde_json", "serde_repr", "serialize-to-javascript", - "shared_child 1.0.0", + "shared_child", "state", "tar", "tauri-macros", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index df056781..626c34b4 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -44,7 +44,6 @@ once_cell = "1.13.0" # Program opener. open = "3.0.2" -duct = "0.13.5" # Services windows-service = "0.6.0" diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 52b54854..625452ca 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -157,7 +157,7 @@ fn main() -> Result<(), ArgsError> { println!("You running as a non-elevated user. Some stuff will almost definitely not work."); println!("==============================================================================="); - reopen_as_admin(); + //reopen_as_admin(); } // Setup datadir/cultivation just in case something went funky and it wasn't made diff --git a/src-tauri/src/system_helpers.rs b/src-tauri/src/system_helpers.rs index a2fc5524..71dd9c17 100644 --- a/src-tauri/src/system_helpers.rs +++ b/src-tauri/src/system_helpers.rs @@ -1,7 +1,7 @@ -use duct::cmd; use ini::Ini; use std::ffi::OsStr; use std::path::PathBuf; +use std::process::Command; #[cfg(windows)] use { @@ -60,7 +60,10 @@ pub fn run_command(program: &str, args: Vec<&str>, relative: Option) { std::env::set_current_dir(&path_buf).unwrap(); } - cmd(prog, args).run().unwrap(); + // Run the command + let mut command = Command::new(&prog); + command.args(&args); + command.spawn().unwrap(); // Restore the original working directory std::env::set_current_dir(cwd).unwrap();