Skip to content

Commit

Permalink
🥅 Panic if github-actions flag defined incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Oct 2, 2022
1 parent 8fef0af commit cd42443
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/config/flags/generic.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ func Force(cmd *cobra.Command, p *bool) {

func GitHubActions(cmd *cobra.Command) {
cmd.PersistentFlags().Bool("github-actions", false, "Enables GitHub Actions log output")
_ = cmd.PersistentFlags().MarkHidden("github-actions")
if err := cmd.PersistentFlags().MarkHidden("github-actions"); err != nil {
panic(err)
}
if err := viper.BindPFlag("github-actions", cmd.PersistentFlags().Lookup("github-actions")); err != nil {
panic(err)
}
Expand Down

0 comments on commit cd42443

Please sign in to comment.