Skip to content

Commit

Permalink
fix: I'm an idiot
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardotglobal committed Oct 10, 2023
1 parent 06071e3 commit 488f152
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions winapps/src/quickemu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,16 @@ pub fn kill_vm(config: Config) {
let data_dir = get_data_dir();

let pid = unwrap_or_exit!(
fs::read_to_string(data_dir.join(format!(
"{}/{}.pid",
config.vm.short_name,
config.vm.name.trim()
))),
fs::read_to_string(
data_dir.join(format!("{}/{}.pid", config.vm.short_name, config.vm.name))
),
"Failed to read PID file, is the VM running and the config correct?"
);

info!("Killing VM with PID {}", pid);

unwrap_or_exit!(
Command::new("kill").arg(pid).spawn(),
Command::new("kill").arg(pid.trim()).spawn(),
"Failed to kill VM (execute kill)"
);
}

0 comments on commit 488f152

Please sign in to comment.