From f39ff7514bbd584518a1237fa6b1fedb45a6d260 Mon Sep 17 00:00:00 2001 From: Retmvv Date: Tue, 31 Dec 2024 16:25:50 +0800 Subject: [PATCH] Fix bug that cwd in config is null --- src/ninja.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ninja.cc b/src/ninja.cc index 2145344..44e1024 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -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; }