Skip to content

Commit 9c1d9a6

Browse files
committed
use copy/remove vs fs rename
1 parent 77e7533 commit 9c1d9a6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cli/src/source.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ pub(crate) fn save_source_info(path: &Path, source: &Source) -> Result<()> {
5454

5555
writer.finish()?;
5656
// Replace the original file with the patched one.
57-
fs::rename(out_path, path)?;
57+
fs::copy(&out_path, path)?;
58+
fs::remove_file(&out_path)?;
5859
Ok(())
5960
}
6061

0 commit comments

Comments
 (0)