Skip to content

Commit f5dd0e1

Browse files
committed
Remove use of CvdFlag from CvdEnvCommandHandler
Bug: b/389804379 Test: /usr/bin/bazel run :cvd -- env --help
1 parent fcccdff commit f5dd0e1

File tree

1 file changed

+5
-5
lines changed
  • base/cvd/cuttlefish/host/commands/cvd/cli/commands

1 file changed

+5
-5
lines changed

base/cvd/cuttlefish/host/commands/cvd/cli/commands/env.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@
2121
#include <string>
2222
#include <vector>
2323

24-
#include "common/libs/utils/contains.h"
24+
#include "common/libs/utils/flag_parser.h"
2525
#include "common/libs/utils/subprocess.h"
2626
#include "host/commands/cvd/cli/commands/command_handler.h"
27-
#include "host/commands/cvd/cli/flag.h"
2827
#include "host/commands/cvd/cli/selector/selector.h"
2928
#include "host/commands/cvd/cli/types.h"
3029
#include "host/commands/cvd/cli/utils.h"
@@ -60,10 +59,11 @@ class CvdEnvCommandHandler : public CvdCommandHandler {
6059
*
6160
* Otherwise, IsHelpSubcmd() should be used here instead.
6261
*/
63-
auto help_flag = CvdFlag("help", false);
62+
bool help = false;
63+
Flag help_flag = GflagsCompatFlag("help", help);
6464
cvd_common::Args subcmd_args_copy{subcmd_args};
65-
auto help_parse_result = help_flag.CalculateFlag(subcmd_args_copy);
66-
bool is_help = help_parse_result.ok() && (*help_parse_result);
65+
auto help_parse_result = ConsumeFlags({help_flag}, subcmd_args_copy);
66+
bool is_help = help_parse_result.ok() && help;
6767

6868
Command command =
6969
is_help ? CF_EXPECT(HelpCommand(request, subcmd_args, env))

0 commit comments

Comments
 (0)