chore(boring-sys): Fix git apply patch on Windows (#261)

* chore(boring-sys): Fix git apply patch on Windows

* cargo fmt --all
This commit is contained in:
0x676e67 2024-08-14 17:53:57 +08:00 committed by GitHub
parent 72b343def1
commit 9053b5d905
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -501,12 +501,16 @@ fn ensure_patches_applied(config: &Config) -> io::Result<()> {
fn apply_patch(config: &Config, patch_name: &str) -> io::Result<()> { fn apply_patch(config: &Config, patch_name: &str) -> io::Result<()> {
let src_path = get_boringssl_source_path(config); let src_path = get_boringssl_source_path(config);
#[cfg(not(windows))]
let cmd_path = config let cmd_path = config
.manifest_dir .manifest_dir
.join("patches") .join("patches")
.join(patch_name) .join(patch_name)
.canonicalize()?; .canonicalize()?;
#[cfg(windows)]
let cmd_path = config.manifest_dir.join("patches").join(patch_name);
let mut args = vec!["apply", "-v", "--whitespace=fix"]; let mut args = vec!["apply", "-v", "--whitespace=fix"];
// non-bazel versions of BoringSSL have no src/ dir // non-bazel versions of BoringSSL have no src/ dir