[tests] Diff: the differential suite runs on Windows too (Windows Caddy, drive paths), with two branch previews in the fixtures; edge leaves a websocket 101 as the upstream sent it, as Caddy does
This commit is contained in:
@@ -126,8 +126,13 @@ pub fn find_binary(name: &str) -> Option<PathBuf> {
|
||||
return Some(PathBuf::from(p));
|
||||
}
|
||||
let path = std::env::var_os("PATH")?;
|
||||
let file = if cfg!(windows) {
|
||||
format!("{name}.exe")
|
||||
} else {
|
||||
name.to_owned()
|
||||
};
|
||||
std::env::split_paths(&path)
|
||||
.map(|d| d.join(name))
|
||||
.map(|d| d.join(&file))
|
||||
.find(|p| p.is_file())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user