Skip to content

CLI: give an error message and return 1 when trying to deploy a non-existent stack #15866

@sarahkadar

Description

@sarahkadar

When trying to deploy a stack that does not exist (for example, cdk deploy thisstackdoesnotexist), the CDK simply gives no output, even the return code is 0. This is confusing, especially for people new to the CDK.

Use Case

Use case is people not getting tripped up by this and scratching their heads, especially for people new to the CDK.

Proposed Solution

Exit with return code 1 and give some sort of error i.e. Error: stack 'thisstackdoesnotexist' does not exist." Could implement some sort of fuzzy matching for stack name suggestions, so it could also say Did you mean [x]? or something like that.

This is a 🚀 Feature Request

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp1package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions