Skip to content

Commit

Permalink
Gracefully handle outdated .ninja_log during '-t recompact'
Browse files Browse the repository at this point in the history
When we explicitly unlink the file we should return LOAD_NOT_FOUND instead of LOAD_SUCCESS
  • Loading branch information
von Heydebrand Julian committed Mar 13, 2024
1 parent ab510c7 commit f693243
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/build_log.cc
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ LoadStatus BuildLog::Load(const string& path, string* err) {
unlink(path.c_str());
// Don't report this as a failure. An empty build log will cause
// us to rebuild the outputs anyway.
return LOAD_SUCCESS;
return LOAD_NOT_FOUND;
}
}

Expand Down

0 comments on commit f693243

Please sign in to comment.