Skip to content

Commit

Permalink
fix(cloud): Do not show suggestion if only one option
Browse files Browse the repository at this point in the history
Signed-off-by: Cezar Craciunoiu <[email protected]>
  • Loading branch information
craciunoiuc committed Sep 18, 2024
1 parent 4847d17 commit 8076b66
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/cli/kraft/cloud/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ func (opts *DeployOptions) Run(ctx context.Context, args []string) error {

d = *candidate

log.G(ctx).Infof("use --as=%s to skip this prompt in the future", d.Name())
if len(candidates) > 1 {
log.G(ctx).Infof("use --as=%s to skip this prompt in the future", d.Name())
}
} else {
return fmt.Errorf("multiple contexts discovered: %v", candidates)
}
Expand Down

0 comments on commit 8076b66

Please sign in to comment.