question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Running "cdk diff" returns error code 1

See original GitHub issue

Despite 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:closed
  • Created 4 years ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
norbinshcommented, Apr 17, 2020

thanks for the update! added this to the cdk.json files and it works as expected through codebuild.

1reaction
shivlakscommented, Apr 17, 2020

@xycodex @udondan - yep that’s a bug (fix is being tracked in #7399)

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found