1
0
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:
Andrew Gallant 2020-02-19 07:09:54 -05:00
parent ee21897ebd
commit c824d095a7

View File

@ -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) => {