Skip to content

Commit

Permalink
do not start server if shutdown requested (+ not in batch mode)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 201144030
  • Loading branch information
Googler authored and ArielleA committed Jun 19, 2018
1 parent 78b6563 commit 2ae255e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/cpp/blaze.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 2ae255e

Please sign in to comment.