Running "cdk diff" returns error code 1
See original GitHub issueDespite the fix introduced in #4650. I’m still experiencing cdk diff
exiting with status code 1.
Reproduction Steps
Run the following shell script:
#!/usr/bin/env bash
set -uo pipefail
cdk diff
EXIT_STATUS=$?
echo "Exit: $EXIT_STATUS"
Environment
- CLI Version : 1.21.1 (build 842cc5f)
- Framework Version: 1.21.1 (build 842cc5f)
- OS : macOS Catalina 10.15.2
- Language : Typescript
Other
Relates to #2111
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 4 years ago
- Comments:20 (11 by maintainers)
Top Results From Across the Web
"cdk diff" returns error code 1 · Issue #2111 - GitHub
Calling cdk difffrom NPM fails because the command does not return 0. package.json "scripts": { "diff": "cdk diff" } Running npm run diff ......
Read more >What are the returned status code of `cdk diff` - Stack Overflow
The documentation for CDK diff states the following: --fail Fail with exit code 1 in case of diff [boolean] [default: false].
Read more >Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK.
Read more >AWS CDK Toolkit - npm
This command returns non-zero if any differences are found. $ # Diff against the currently deployed stack $ cdk diff --app='node bin/ ...
Read more >awslabs/aws-cdk - Gitter
One problem that I've found out is that commands like cdk diff exits with exit code 1 even though there are no issues....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
thanks for the update! added this to the cdk.json files and it works as expected through codebuild.
@xycodex @udondan - yep that’s a bug (fix is being tracked in #7399)