Ask questionsRunning "cdk diff" returns error code 1

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
echo "Exit: $EXIT_STATUS"


  • CLI Version : 1.21.1 (build 842cc5f)
  • Framework Version: 1.21.1 (build 842cc5f)
  • OS : macOS Catalina 10.15.2
  • Language : Typescript


Relates to #2111

This is :bug: Bug Report


Answer questions eikeon

Shouldn't the --fail option be removed if it doesn't actually work? Seems like it needs to be spelled cdk diff -c aws-cdk:enableDiffNoFail=true?


Related questions

Issues compiling CDK projects ("TS2300: Duplicate identifier 'IteratorResult'")
cli: cdk deploy issue hot 3
Subnet selection returns more than one per AZ hot 2
cli: synth fails if cdk.out does not exist hot 2
Default policy are getting creating even when Managed policy were created in the Role hot 1
Python dependency libraries are set to latest hot 1
using json instead of a string as context in cdk.json hot 1
Attaching Managed Policy to Role failing hot 1
Access denied when adding an event notification to an existing s3 bucket hot 1
Unable to create CfnSpotFleet using Python hot 1
DBClusterParameterGroup not found: default.aurora5.6 hot 1
aws-ecs: Cannot deploy fargate services with ECR images hot 1
ecs_patterns.ApplicationLoadBalancedFargateService should allow specifying healthCheck path - aws-cdk hot 1
CodeCommitSourceAction tries to add a policy to an imported role hot 1
Using getAtt that returns a list within a string that is joined in the generated template throws an error hot 1
Github User Rank List