@ 261027.5

260803.2 · 7525479a9576f1ca4c2d04339d78e47ff5ae9b05

ci: fix binary discovery

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.

reading declarations

Changes to tests/util.rs. All files

tests/util.rs

@@ -177,7 +177,11 @@ impl Dir {      /// Returns the path to the ripgrep executable.     pub fn bin(&self) -> process::Command {-        let rg = self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX));+        let rg = std::env::var_os("CARGO_BIN_EXE_rg")+            .map(PathBuf::from)+            .unwrap_or_else(|| {+                self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX))+            });         match cross_runner() {             None => process::Command::new(rg),             Some(runner) => {