File tree 1 file changed +3
-1
lines changed
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -53,8 +53,10 @@ fn touch(root: &Path, path: &Path) -> anyhow::Result<()> {
53
53
54
54
fn touch_all ( path : & Path ) -> anyhow:: Result < ( ) > {
55
55
let mut cmd = Command :: new ( "bash" ) ;
56
+ // Don't touch files in `target/`, since they're likely generated by build scripts and might be from a dependency.
57
+ // Don't touch build scripts, which confuses the wrapped rustc.
56
58
cmd. current_dir ( path)
57
- . args ( & [ "-c" , "find . -name '*.rs' | xargs touch" ] ) ;
59
+ . args ( & [ "-c" , "find . -path ./target -prune -false -o - name '*.rs' | grep -v '^./build.rs$ ' | xargs touch" ] ) ;
58
60
command_output ( & mut cmd) . with_context ( || format ! ( "touching all .rs in {:?}" , path) ) ?;
59
61
// We also delete the cmake caches to avoid errors when moving directories around.
60
62
// This might be a bit slower but at least things build
You can’t perform that action at this time.
0 commit comments