Skip to content

Commit

Permalink
hides CLI profile list label flag (#3307)
Browse files Browse the repository at this point in the history
* hides CLI profile list label flag

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>

* fix: error handling for hiding label flag

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>

---------

Signed-off-by: ChrisJBurns <29541485+ChrisJBurns@users.noreply.github.com>
  • Loading branch information
ChrisJBurns committed May 11, 2024
1 parent e38e175 commit 4c9a0a8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/cli/app/profile/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package profile
import (
"context"
"fmt"
"os"
"strings"

"github.com/spf13/cobra"
Expand Down Expand Up @@ -90,6 +91,10 @@ func listCommand(ctx context.Context, cmd *cobra.Command, _ []string, conn *grpc
func init() {
ProfileCmd.AddCommand(listCmd)
listCmd.Flags().StringP("label", "l", "", "Profile label to filter on")
if err := listCmd.Flags().MarkHidden("label"); err != nil {
listCmd.Printf("Error hiding flag: %s", err)
os.Exit(1)
}

// Flags
listCmd.Flags().StringP("output", "o", app.Table,
Expand Down

0 comments on commit 4c9a0a8

Please sign in to comment.