From fdc617d87036ff137e52bd1f5f91a6426bc69b7b Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Wed, 12 Oct 2022 15:56:26 +1100 Subject: [PATCH] Fix `install_from_source`: Set `cmd` to be kill_on_drop (#479) If user interrupts `cargo-binstall` by signal while it is running `cargo-install`, then the `cargo-install` would continue to run at background even after `cargo-binstall` terminates. Setting `cmd` to be kill_on_drop fixed this. Signed-off-by: Jiahao XU --- crates/binstalk/src/ops/install.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/binstalk/src/ops/install.rs b/crates/binstalk/src/ops/install.rs index 658758be..6a6c086b 100644 --- a/crates/binstalk/src/ops/install.rs +++ b/crates/binstalk/src/ops/install.rs @@ -121,7 +121,8 @@ async fn install_from_source( .arg("--version") .arg(version) .arg("--target") - .arg(target); + .arg(target) + .kill_on_drop(true); if quiet { cmd.arg("--quiet");