FIX codegen, again

This commit is contained in:
Maybe Waffle 2023-01-14 18:46:53 +04:00
parent 01bc5a990b
commit e86184fcd0

View file

@ -78,11 +78,13 @@ pub fn ensure_files_contents<'a>(
let mut err_count = 0;
for (path, contents) in files_and_contents {
let old_contents = fs::read_to_string(path).unwrap();
if normalize_newlines(&old_contents) == normalize_newlines(contents) {
// File is already up to date.
continue;
if path.exists() {
let old_contents = fs::read_to_string(path).unwrap();
if normalize_newlines(&old_contents) == normalize_newlines(contents) {
// File is already up to date.
continue;
}
}
err_count += 1;