Skip to content

Commit

Permalink
Fix bug that cwd in config is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Retmvv committed Dec 31, 2024
1 parent 8ad842f commit f39ff75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ninja.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1596,6 +1596,11 @@ NORETURN void real_main(int argc, char** argv) {
}
std::string project_root = "../";
if (config.cloud_run || config.share_run) {
string err;
if (!GetCurrentDirectory(&config.rbe_config.cwd, &err)) {
Error(err.c_str());
exit(1);
}
if (!config.rbe_config.project_root.empty()) {
project_root = config.rbe_config.project_root;
}
Expand Down

0 comments on commit f39ff75

Please sign in to comment.