Skip to content

Commit

Permalink
-ui flag on the generic status endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
philrenaud committed Dec 13, 2024
1 parent 67f5207 commit 6bbb350
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion command/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type StatusCommand struct {

// Placeholder bool to allow passing of verbose flags to subcommands.
verbose bool
openURL bool
}

func (c *StatusCommand) Help() string {
Expand All @@ -38,6 +39,9 @@ Status Options:
-verbose
Display full information.
-ui
Open the status page in the browser.
`

return strings.TrimSpace(helpText)
Expand All @@ -51,6 +55,7 @@ func (c *StatusCommand) AutocompleteFlags() complete.Flags {
return mergeAutocompleteFlags(c.Meta.AutocompleteFlags(FlagSetClient),
complete.Flags{
"-verbose": complete.PredictNothing,
"-ui": complete.PredictNothing,
})
}

Expand Down Expand Up @@ -84,7 +89,7 @@ func (c *StatusCommand) Run(args []string) int {
flags := c.Meta.FlagSet("status", FlagSetClient)
flags.Usage = func() { c.Ui.Output(c.Help()) }
flags.BoolVar(&c.verbose, "verbose", false, "")

flags.BoolVar(&c.openURL, "ui", false, "")
if err := flags.Parse(args); err != nil {
c.Ui.Error(fmt.Sprintf("Error parsing arguments: %q", err))
return 1
Expand Down

0 comments on commit 6bbb350

Please sign in to comment.