Skip to content

Commit

Permalink
Return an error when no stacks were found
Browse files Browse the repository at this point in the history
  • Loading branch information
errordeveloper authored Jan 25, 2019
1 parent 3631eef commit 1cd76eb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cfn/manager/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,9 @@ func (c *StackCollection) DescribeStacks() ([]*Stack, error) {
if err != nil {
return nil, errors.Wrapf(err, "describing CloudFormation stacks for %q", c.spec.Metadata.Name)
}
if len(stacks) == 0 {
return nil, fmt.Errorf("no eksctl-managed CloudFormation stacks found for %q", c.spec.Metadata.Name)
}
return stacks, nil
}

Expand Down

0 comments on commit 1cd76eb

Please sign in to comment.