Skip to content

Commit

Permalink
Add check for missing release-label when namespace is specified
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob LeGrone <[email protected]>
  • Loading branch information
jlegrone committed Dec 9, 2018
1 parent 320af7a commit bb45244
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,11 @@ func LoadConfiguration(cfgFile string, cmd *cobra.Command, bindFlagsFunc ...func
}

if cfg.ProcessAllCharts && len(cfg.Charts) > 0 {
return nil, errors.New("Specifying both, '--all' and '--charts', is not allowed!")
return nil, errors.New("specifying both, '--all' and '--charts', is not allowed")
}

if cfg.Namespace != "" && cfg.ReleaseLabel == "" {
return nil, errors.New("specifying '--namespace' without '--release-label' is not allowed")
}

isLint := strings.Contains(cmd.Use, "lint")
Expand Down

0 comments on commit bb45244

Please sign in to comment.