cmd: replace deprecate func use (#5170)

This commit is contained in:
Mohammed Al Sahaf 2022-10-25 17:56:38 +03:00 committed by GitHub
parent 798c4a3ba4
commit f20a8e7aa0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -456,7 +456,7 @@ argument of --directory. If the directory does not exist, it will be created.
`, rootCmd.Root().Name()), `, rootCmd.Root().Name()),
DisableFlagsInUseLine: true, DisableFlagsInUseLine: true,
ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, ValidArgs: []string{"bash", "zsh", "fish", "powershell"},
Args: cobra.ExactValidArgs(1), Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
switch args[0] { switch args[0] {
case "bash": case "bash":