Skip to content

Commit

Permalink
fix(cli): error out if add-plugins has selector but no config (#1211)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieske committed Feb 8, 2024
1 parent 4548a0e commit 3ced75c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/file_addplugins.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ func executeAddPlugins(cmd *cobra.Command, cfgFiles []string) error {

var pluginConfigs []map[string]interface{}
{
if len(cmdAddPluginsStrConfigs) == 0 && len(cmdAddPluginsSelectors) > 0 {
return fmt.Errorf("--selector flag given, but no --config specified")
}
for _, strConfig := range cmdAddPluginsStrConfigs {
pluginConfig, err := filebasics.Deserialize([]byte(strConfig))
if err != nil {
Expand Down

0 comments on commit 3ced75c

Please sign in to comment.