Skip to content

Commit

Permalink
Auto merge of #10931 - ehuss:ignore-hg, r=weihanglo
Browse files Browse the repository at this point in the history
Always allow hg to be missing on CI.

`hg` isn't installed on rust-lang/rust Docker images, which causes this check to fail.

Rather than trying to carefully enforce the requirements for `hg` being tested, this just ignores the test if it is unavailable on CI. I think this is something that can be revisited if Cargo ever gains more hg support.
  • Loading branch information
bors committed Aug 2, 2022
2 parents 0fb9e85 + a8e285a commit 5514f1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/cargo-test-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5514f1e

Please sign in to comment.