mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 01:30:21 -07: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.
|
/// Returns the path to the ripgrep executable.
|
||||||
pub fn bin(&self) -> process::Command {
|
pub fn bin(&self) -> process::Command {
|
||||||
let rg = if cfg!(windows) {
|
let rg = self.root.join(format!("../rg{}", env::consts::EXE_SUFFIX));
|
||||||
self.root.join("../rg.exe")
|
|
||||||
} else {
|
|
||||||
self.root.join("../rg")
|
|
||||||
};
|
|
||||||
match cross_runner() {
|
match cross_runner() {
|
||||||
None => process::Command::new(rg),
|
None => process::Command::new(rg),
|
||||||
Some(runner) => {
|
Some(runner) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user