Skip to content

Commit

Permalink
Update pkg/cmd/pulumi/util.go
Browse files Browse the repository at this point in the history
Co-authored-by: Kyle Dixler <kyle@pulumi.com>
  • Loading branch information
aq17 and Kyle Dixler committed Nov 18, 2022
1 parent e455c6d commit 55210e6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/cmd/pulumi/util.go
Expand Up @@ -369,8 +369,7 @@ func chooseStack(ctx context.Context,
} else if len(options) == 0 {
// If no options are available, we can't offer a choice!
return nil, errors.New("this command requires a stack, but there are none")
} else {
if defaultOption == "" {
} else if defaultOption == "" && len(options) > 0 {
defaultOption = options[0]
}
}
Expand Down

0 comments on commit 55210e6

Please sign in to comment.