Skip to content

Commit

Permalink
ExactValidArgs is deprecated. See spf13/cobra#1643
Browse files Browse the repository at this point in the history
  • Loading branch information
kajes committed Oct 18, 2022
1 parent fc13198 commit ecabe54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/completion.go
Expand Up @@ -17,7 +17,7 @@ func NewCmdCompletion() *cobra.Command {
Short: docs.CompletionDocs.Short,
Long: docs.CompletionDocs.Long,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Example: docs.CompletionDocs.ExampleString(),
Run: func(cmd *cobra.Command, args []string) {
switch args[0] {
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate.go
Expand Up @@ -24,7 +24,7 @@ var generateCmd = &cobra.Command{
},
DisableFlagsInUseLine: true,
ValidArgs: []string{"man", "markdown", "md", "all"},
Args: cobra.ExactValidArgs(1),
Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
Short: "Generates man pages for sdpctl",
RunE: func(cmd *cobra.Command, args []string) error {
switch args[0] {
Expand Down

0 comments on commit ecabe54

Please sign in to comment.