-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
bugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
Description
What is the problem?
As per the title, running cdk synth on code that uses Aspects to add an Error via Annotations is still generating CloudFormation. According to the relevant inline documentation, "The toolkit will fail synthesis when errors are reported."
Reproduction Steps
Example code: https://pastebin.com/VVvmZFhS
What did you expect to happen?
I expected:
- an error message to be displayed on the cli
- a non-zero exit code to be returned
- no CloudFormation to be generated
What actually happened?
Running cdk synth on the code available at https://pastebin.com/VVvmZFhS results in:
- an error message is displayed on the cli
- an exit code of
1is returned - CloudFormation output is still generated, despite the error
CDK CLI Version
2.4.0 (build 993f14d)
Framework Version
No response
Node.js Version
v16.13.0
OS
macOS Monterey 12.1
Language
Typescript
Language Version
Typescript 4.5.4
Other information
I've raised this in the cdk.dev Slack channel where the same behaviour has been reproduced by others.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.effort/smallSmall work item – less than a day of effortSmall work item – less than a day of effortp2package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI