fix: remove duct

This commit is contained in:
SpikeHD
2023-06-06 17:33:36 -07:00
parent 06e1ca23e1
commit ed9fb9a644
4 changed files with 8 additions and 39 deletions

View File

@@ -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

View File

@@ -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<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();