Skip to content

Commit

Permalink
fix: cobra deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucassabreu committed May 25, 2024
1 parent 190523b commit 26ee88d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cmd/completion/completion.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ func NewCmdCompletion() *cobra.Command {
Short: "Generate completion script",
DisableFlagsInUseLine: true,
ValidArgs: args.OnlyArgs(),
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(
cobra.OnlyValidArgs,
cobra.ExactArgs(1),
),
RunE: func(cmd *cobra.Command, args []string) error {
out := cmd.OutOrStdout()
switch strings.ToLower(args[0]) {
Expand Down

0 comments on commit 26ee88d

Please sign in to comment.