From 488f152d14353f54ad103d5a5fca89027115b0fe Mon Sep 17 00:00:00 2001 From: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com> Date: Tue, 10 Oct 2023 19:22:10 +0200 Subject: [PATCH] fix: I'm an idiot --- winapps/src/quickemu.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/winapps/src/quickemu.rs b/winapps/src/quickemu.rs index d0b6206..d2cb54c 100644 --- a/winapps/src/quickemu.rs +++ b/winapps/src/quickemu.rs @@ -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)" ); }