Skip to content

Commit 6777d63

Browse files
author
Mike Farah
committed
Fixed error handling
1 parent de8dcff commit 6777d63

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

cmd/shell_completion.go

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,13 @@ func createBashCompletionCmd(rootCmd *cobra.Command) *cobra.Command {
2525
RunE: func(cmd *cobra.Command, args []string) error {
2626
switch shellVariant {
2727
case "bash", "":
28-
rootCmd.GenBashCompletion(os.Stdout)
29-
return nil
28+
return rootCmd.GenBashCompletion(os.Stdout)
3029
case "zsh":
31-
rootCmd.GenZshCompletion(os.Stdout)
32-
return nil
30+
return rootCmd.GenZshCompletion(os.Stdout)
3331
case "fish":
34-
rootCmd.GenFishCompletion(os.Stdout, true)
35-
return nil
32+
return rootCmd.GenFishCompletion(os.Stdout, true)
3633
case "powershell":
37-
rootCmd.GenPowerShellCompletion(os.Stdout)
38-
return nil
34+
return rootCmd.GenPowerShellCompletion(os.Stdout)
3935
default:
4036
return fmt.Errorf("Unknown variant %v", shellVariant)
4137
}

0 commit comments

Comments
 (0)