mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2026-10-11 22:09:55 +00:00
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.
This commit is contained in:
+5
-1
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user