diff --git a/Cargo.lock b/Cargo.lock index 5a39bd6..c518496 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,6 +14,7 @@ version = "0.1.0" dependencies = [ "anyhow", "atty", + "command-group", "dialoguer", "dirs", "env_logger", @@ -78,9 +79,9 @@ checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bitflags" -version = "1.3.2" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bumpalo" @@ -148,6 +149,16 @@ dependencies = [ "vec_map", ] +[[package]] +name = "command-group" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7a8a86f409b4a59df3a3e4bee2de0b83f1755fdd2a25e3a9684c396fc4bed2c" +dependencies = [ + "nix", + "winapi", +] + [[package]] name = "console" version = "0.15.0" @@ -557,6 +568,15 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + [[package]] name = "mime" version = "0.3.16" @@ -613,6 +633,19 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nix" +version = "0.22.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3bb9a13fa32bc5aeb64150cd3f32d6cf4c748f8f8a417cce5d2eb976a8370ba" +dependencies = [ + "bitflags", + "cc", + "cfg-if", + "libc", + "memoffset", +] + [[package]] name = "ntapi" version = "0.3.6" @@ -881,9 +914,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.4.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" dependencies = [ "bitflags", "core-foundation", diff --git a/Cargo.toml b/Cargo.toml index 97f07fd..ad3deb8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ repository = "https://github.com/LPGhatguy/aftman" [dependencies] anyhow = "1.0.43" atty = "0.2.14" +command-group = "1.0.8" dialoguer = "0.9.0" dirs = "3.0.2" env_logger = "0.9.0" diff --git a/src/tool_storage.rs b/src/tool_storage.rs index c3da82b..1bcf12b 100644 --- a/src/tool_storage.rs +++ b/src/tool_storage.rs @@ -8,6 +8,7 @@ use std::path::{Path, PathBuf}; use std::process::Command; use anyhow::{bail, Context}; +use command_group::CommandGroup; use fs_err::File; use once_cell::unsync::OnceCell; @@ -56,7 +57,7 @@ impl ToolStorage { self.install_exact(id)?; let exe_path = self.exe_path(id); - let status = Command::new(exe_path).args(args).status().unwrap(); + let status = Command::new(exe_path).args(args).group_status().unwrap(); Ok(status.code().unwrap_or(1)) }