Skip to content

Commit

Permalink
Disallow --only if config file not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
weave-e2e-quickstart committed Feb 20, 2019
1 parent 6da339a commit 65008ab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/ctl/create/nodegroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ func doCreateNodeGroups(p *api.ProviderConfig, cfg *api.ClusterConfig, nameArg s
return errors.New("--cluster must be set")
}

if nodeGroupFilter != "" {
return errors.New("cannot use --only unless a config file is specified via --config-file/-f")
}

err := checkEachNodeGroup(cfg, func(i int, ng *api.NodeGroup) error {
if ng.AllowSSH && ng.SSHPublicKeyPath == "" {
return fmt.Errorf("--ssh-public-key must be non-empty string")
Expand Down

0 comments on commit 65008ab

Please sign in to comment.