File tree Expand file tree Collapse file tree 3 files changed +6
-28
lines changed
Expand file tree Collapse file tree 3 files changed +6
-28
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,6 @@ prost.workspace = true
1515
1616[build-dependencies ]
1717prost-build.workspace = true
18- which = " 4.4"
1918
2019[features ]
2120regenerate-protobuf = []
Original file line number Diff line number Diff line change @@ -4,14 +4,15 @@ fn main() -> Result<()> {
44 #[ cfg( feature = "regenerate-protobuf" ) ]
55 {
66 use std:: path:: PathBuf ;
7+ use std:: process:: Command ;
78 let out_dir = PathBuf :: from ( std:: env:: var ( "OUT_DIR" ) . unwrap ( ) ) ;
89 println ! ( "cargo:rerun-if-changed=src/plugin.proto" ) ;
910
1011 if std:: env:: var ( "PROTOC" ) . is_ok ( )
11- || which :: which ( "protoc" ) . is_ok ( )
12- || which :: which ( "protoc-gen-rust" ) . is_ok ( )
13- || which :: which ( "protoc-gen-rust-macos" ) . is_ok ( )
14- || which :: which ( "protoc-gen-rust-linux" ) . is_ok ( )
12+ || Command :: new ( "protoc" ) . output ( ) . is_ok ( )
13+ || Command :: new ( "protoc-gen-rust" ) . output ( ) . is_ok ( )
14+ || Command :: new ( "protoc-gen-rust-macos" ) . output ( ) . is_ok ( )
15+ || Command :: new ( "protoc-gen-rust-linux" ) . output ( ) . is_ok ( )
1516 {
1617 if let Err ( e) = prost_build:: Config :: new ( )
1718 . out_dir ( & out_dir)
You can’t perform that action at this time.
0 commit comments