Skip to content

Commit

Permalink
Merge 9c5c48c into eaf306e
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW authored Nov 9, 2022
2 parents eaf306e + 9c5c48c commit 17d2473
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/badge/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ var rootCmd = &cobra.Command{
Long: `Generate SVG badge.`,
RunE: func(cmd *cobra.Command, args []string) error {
b := badge.New(label, message)
if labelColor == "" {
if labelColor != "" {
if err := b.SetLabelColor(labelColor); err != nil {
return err
}
}
if messageColor == "" {
if messageColor != "" {
if err := b.SetMessageColor(messageColor); err != nil {
return err
}
Expand All @@ -75,7 +75,7 @@ func Execute() {
func init() {
rootCmd.Flags().StringVarP(&label, "label", "l", "label is here", "label of badge")
rootCmd.Flags().StringVarP(&message, "message", "m", "message is here", "message of badge")
rootCmd.Flags().StringVarP(&labelColor, "label-color", "lc", "", "color of label background")
rootCmd.Flags().StringVarP(&messageColor, "label-message", "mc", "", "color of message background")
rootCmd.Flags().StringVarP(&labelColor, "label-color", "L", "", "color of label background")
rootCmd.Flags().StringVarP(&messageColor, "label-message", "M", "", "color of message background")
rootCmd.Flags().StringVarP(&icon, "icon", "i", "", "icon of badge")
}

0 comments on commit 17d2473

Please sign in to comment.