mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-13 21:26:27 +02:00
tests: use std::env::consts::EXE_SUFFIX
This avoids a conditional compilation knob and is likely more portable.
This commit is contained in:
parent
ee21897ebd
commit
c824d095a7
@ -172,11 +172,7 @@ impl Dir {
|
||||
|
||||
/// Returns the path to the ripgrep executable.
|
||||
pub fn bin(&self) -> process::Command {
|
||||
let rg = if cfg!(windows) {
|
||||
self.root.join("../rg.exe")
|
||||
} else {
|
||||
self.root.join("../rg")
|
||||
};
|
||||
let rg = self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX));
|
||||
match cross_runner() {
|
||||
None => process::Command::new(rg),
|
||||
Some(runner) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user