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 <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2022-10-12 15:56:26 +11:00 committed by GitHub
parent 035e600a56
commit fdc617d870
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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