Skip to content

Commit

Permalink
fix: remove duct
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD authored and NotThorny committed Jun 7, 2023
1 parent bf57eb4 commit 834aaf1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 39 deletions.
37 changes: 2 additions & 35 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 5 additions & 2 deletions src-tauri/src/system_helpers.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -60,7 +60,10 @@ pub fn run_command(program: &str, args: Vec<&str>, relative: Option<bool>) {
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();
Expand Down

0 comments on commit 834aaf1

Please sign in to comment.