File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 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<()> {
5353
5454fn touch_all ( path : & Path ) -> anyhow:: Result < ( ) > {
5555 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.
5658 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" ] ) ;
5860 command_output ( & mut cmd) . with_context ( || format ! ( "touching all .rs in {:?}" , path) ) ?;
5961 // We also delete the cmake caches to avoid errors when moving directories around.
6062 // This might be a bit slower but at least things build
You can’t perform that action at this time.
0 commit comments