Skip to content

Commit

Permalink
fix: simplify return logic
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Wasilewski <michal@mwasilewski.net>
  • Loading branch information
mwasilew2 committed Sep 29, 2023
1 parent 8a3c9dd commit d75a4b2
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions internal/cmd/stack/stack_selector.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,7 @@ func stackExists(ctx context.Context, stackId string) (bool, error) {
return false, fmt.Errorf("failed to query GraphQL API when checking if a stack exists: %w", err)
}

if query.Stack.ID == "" {
return false, nil
}
return true, nil
return query.Stack.ID != "", nil
}

func findAndSelectStack(ctx context.Context, p *stackSearchParams, forcePrompt bool) (string, error) {
Expand Down

0 comments on commit d75a4b2

Please sign in to comment.