-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid builds-without-the-bytes bug on Windows (#2919)
After #2826 was merged, I started seeing flaky builds on Windows related to build script executables (#2891 (comment)). This appears to be related to bazelbuild/bazel#21747 so to avoid the issue, this change ensures that Windows build script executables are copied instead of symlinked.
- Loading branch information
1 parent
884a7a2
commit 81d925c
Showing
3 changed files
with
53 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
//! A tool for copying files and avoiding | ||
//! https://github.com/bazelbuild/bazel/issues/21747 | ||
|
||
use std::env; | ||
use std::fs; | ||
use std::path::PathBuf; | ||
|
||
fn main() { | ||
let src = PathBuf::from(std::env::args().nth(1).expect("No source file provided")); | ||
let dest = PathBuf::from(env::args().nth(2).expect("No destination provided")); | ||
|
||
fs::copy(&src, &dest).unwrap_or_else(|e| { | ||
panic!( | ||
"Failed to copy file `{} -> {}`\n{:?}", | ||
src.display(), | ||
dest.display(), | ||
e | ||
) | ||
}); | ||
} |