diff options
author | 2017-07-10 19:17:40 +0200 | |
---|---|---|
committer | 2017-07-11 10:55:40 +0200 | |
commit | c00ba52673779660451cb04666e75a349e71d874 (patch) | |
tree | d6e9bef049e8afa659c93d61eef4598e4ac00369 /src/main/cpp/blaze.cc | |
parent | a96369c1c66df624bbee0d9e1c7ad38fea55cd26 (diff) |
Use a CommandLine struct to store the command line parsed by the OptionProcessor.
This replaces the startup_args_, command_ and command_argument members to allow a more consistent representation of the command line throughout the class.
PiperOrigin-RevId: 161408010
Diffstat (limited to 'src/main/cpp/blaze.cc')
-rw-r--r-- | src/main/cpp/blaze.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc index f9acc8aa78..a77504b88f 100644 --- a/src/main/cpp/blaze.cc +++ b/src/main/cpp/blaze.cc @@ -640,8 +640,8 @@ static void StartStandalone(const WorkspaceLayout *workspace_layout, globals->options->product_name.c_str()); } string command = globals->option_processor->GetCommand(); - vector<string> command_arguments; - globals->option_processor->GetCommandArguments(&command_arguments); + const vector<string> command_arguments = + globals->option_processor->GetCommandArguments(); if (!command_arguments.empty() && command == "shutdown") { string product = globals->options->product_name; @@ -1604,7 +1604,13 @@ unsigned int GrpcBlazeServer::Communicate() { AddLoggingArgs(&arg_vector); } - globals->option_processor->GetCommandArguments(&arg_vector); + const vector<string> command_args = + globals->option_processor->GetCommandArguments(); + if (!command_args.empty()) { + arg_vector.insert(arg_vector.end(), + command_args.begin(), + command_args.end()); + } command_server::RunRequest request; request.set_cookie(request_cookie_); |