Make cluster optional in context setup

Signed-off-by: Guillaume Lours <guillaume.lours@docker.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Guillaume Lours 2020-05-11 17:19:51 +02:00 committed by Nicolas De Loof
parent 4ab37f8229
commit 69a7ef0763
No known key found for this signature in database
GPG Key ID: 9858809D6F8F6E7E
1 changed files with 1 additions and 5 deletions

View File

@ -30,10 +30,6 @@ func (s setupOptions) unsetRequiredArgs() []string {
if s.context.Profile == "" {
unset = append(unset, "profile")
}
if s.context.Cluster == "" {
unset = append(unset, "cluster")
}
if s.context.Region == "" {
unset = append(unset, "region")
}
@ -204,7 +200,7 @@ func setRegion(opts *setupOptions, section ini.Section) error {
}
func setCluster(opts *setupOptions, err error) error {
result, err := promptString(opts.context.Cluster, "cluster name", enterLabelPrefix, 2)
result, err := promptString(opts.context.Cluster, "cluster name", enterLabelPrefix, 0)
if err != nil {
return err
}