Skip to content

CLI: stack name is not checked before delete confirmation #32545

Open
ryichk/todolist
#19
@mrgum

Description

@mrgum

Describe the bug

if you cdk destroy a stack that does not exist (say you are accidentally in the directory) cdk says

Are you sure you want to delete: (y/n)?
and does nothing when you say y

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

cdk to respond
No stacks match the name(s) whatever/you/asked/for
like cdk synth does

Current Behavior

Are you sure you want to delete: (y/n)?

Reproduction Steps

cdk destroy made/of/a/nonexistent/stack

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.173.1 (build 4eac959)

Framework Version

No response

Node.js Version

v22.11.0

OS

Mac

Language

Python

Language Version

3.13

Other information

I don't think the language is relevant

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/coreRelated to core CDK functionalitybugThis issue is a bug.effort/mediumMedium work item – several days of effortp3package/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