From a8e285aa188accd682ffcefd20da7772c53b1289 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Tue, 2 Aug 2022 15:18:16 -0700 Subject: [PATCH] Always allow hg to be missing on CI. --- crates/cargo-test-macro/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/cargo-test-macro/src/lib.rs b/crates/cargo-test-macro/src/lib.rs index 65a68204a43..b4e5a930612 100644 --- a/crates/cargo-test-macro/src/lib.rs +++ b/crates/cargo-test-macro/src/lib.rs @@ -156,10 +156,10 @@ fn has_command(command: &str) -> bool { let output = match Command::new(command).arg("--version").output() { Ok(output) => output, Err(e) => { - // hg is not installed on GitHub macos. - // Consider installing it if Cargo gains more hg support, but - // otherwise it isn't critical. - if is_ci() && !(cfg!(target_os = "macos") && command == "hg") { + // hg is not installed on GitHub macOS or certain constrained + // environments like Docker. Consider installing it if Cargo gains + // more hg support, but otherwise it isn't critical. + if is_ci() && command != "hg" { panic!( "expected command `{}` to be somewhere in PATH: {}", command, e