From 9053b5d905e8eaa6fd6e05a1cd713f5533fe58a5 Mon Sep 17 00:00:00 2001 From: 0x676e67 Date: Wed, 14 Aug 2024 17:53:57 +0800 Subject: [PATCH] chore(boring-sys): Fix git apply patch on Windows (#261) * chore(boring-sys): Fix git apply patch on Windows * cargo fmt --all --- boring-sys/build/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/boring-sys/build/main.rs b/boring-sys/build/main.rs index 4d2ab6c0..05242028 100644 --- a/boring-sys/build/main.rs +++ b/boring-sys/build/main.rs @@ -501,12 +501,16 @@ fn ensure_patches_applied(config: &Config) -> io::Result<()> { fn apply_patch(config: &Config, patch_name: &str) -> io::Result<()> { let src_path = get_boringssl_source_path(config); + #[cfg(not(windows))] let cmd_path = config .manifest_dir .join("patches") .join(patch_name) .canonicalize()?; + #[cfg(windows)] + let cmd_path = config.manifest_dir.join("patches").join(patch_name); + let mut args = vec!["apply", "-v", "--whitespace=fix"]; // non-bazel versions of BoringSSL have no src/ dir