Skip to content
Myr

ci: fix binary discovery

Before adoption: this commit came in with the history the project adopted, so no landing records it.

It looks like the location of executables is changing in Cargo's test runner, so use the blessed way of discovering an executable. That is, for ripgrep, consult the `CARGO_BIN_EXE_rg` environment variable.

authored by Andrew Gallant · committed by Andrew Gallant · parent 5ed408e · Browse files · 1 file+5 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−1 removed

  • tests:+5 added−1 removed

1 file+5 added−1 removed

modified:tests/util.rs+5 added-1 removed
175 unmodified lines
176 }177178 /// Returns the path to the ripgrep executable.179 pub fn bin(&self) -> process::Command {180 let rg = self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX));180 let rg = std::env::var_os("CARGO_BIN_EXE_rg")181 .map(PathBuf::from)182 .unwrap_or_else(|| {183 self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX))184 });185 match cross_runner() {186 None => process::Command::new(rg),187 Some(runner) => {188 let mut cmd = process::Command::new(runner);
340 unmodified lines