diff options
author | Googler <noreply@google.com> | 2018-06-19 02:39:38 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-06-19 02:41:00 -0700 |
commit | 4ad6969021e16746672d3fcf95b6cdf8cb6c43f2 (patch) | |
tree | cc1eb934fcc3fa190975170e7bf1cfd555de8be9 /src/main/cpp | |
parent | e3650359bd82dc50c6d4776ae260b6cd15d85efc (diff) |
do not start server if shutdown requested (+ not in batch mode)
PiperOrigin-RevId: 201144030
Diffstat (limited to 'src/main/cpp')
-rw-r--r-- | src/main/cpp/blaze.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index 1b40ca08e4..055e3fd792 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -1523,6 +1523,13 @@ int Main(int argc, const char *argv[], WorkspaceLayout *workspace_layout, globals->jvm_path = globals->options->GetJvm(); blaze_server->Connect(); + + if (!globals->options->batch && + "shutdown" == globals->option_processor->GetCommand() && + !blaze_server->Connected()) { + return 0; + } + EnsureCorrectRunningVersion(blaze_server); KillRunningServerIfDifferentStartupOptions(workspace_layout, blaze_server); |