Skip to content

Commit a461362

Browse files
windows-fryercopybara-github
authored andcommitted
Fix Windows path handling in build script (#21606)
PR for patch mentioned in #21590 Closes #21606 COPYBARA_INTEGRATE_REVIEW=#21606 from windows-fryer:main 5cf3804 PiperOrigin-RevId: 755541111
1 parent b842722 commit a461362

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rust/release_crates/protobuf/build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ fn main() {
1919
.file("libupb/third_party/utf8_range/utf8_range.c")
2020
.define("UPB_BUILD_API", Some("1"))
2121
.compile("libupb");
22-
let path = std::path::Path::new("libupb");
23-
println!("cargo:include={}", path.canonicalize().unwrap().display());
22+
23+
let path = std::path::absolute("libupb").expect("Failed to get full path to libupb");
24+
25+
println!("cargo:include={}", path.display());
2426
println!("cargo:version={}", VERSION);
2527
}

0 commit comments

Comments
 (0)