🐞 fix: Unable to correctly locate protoc in PATH

This commit is contained in:
m1m1sha
2024-05-05 12:15:45 +08:00
committed by Sijie.Sun
parent 0af32526f7
commit 064a009cb4

View File

@@ -19,8 +19,8 @@ impl WindowsBuild {
let path = env::var_os("PATH").unwrap_or_default();
for p in env::split_paths(&path) {
let p = p.join("protoc");
if p.exists() {
let p = p.join("protoc.exe");
if p.exists() && p.is_file() {
return Some(p);
}
}