fix(cli): flag is incorrectly modified when it's the only one detected#1183
Merged
aws-cdk-automation merged 1 commit intomainfrom Feb 27, 2026
Merged
fix(cli): flag is incorrectly modified when it's the only one detected#1183aws-cdk-automation merged 1 commit intomainfrom
aws-cdk-automation merged 1 commit intomainfrom
Conversation
mrgrain
approved these changes
Feb 27, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1183 +/- ##
==========================================
+ Coverage 87.70% 87.76% +0.05%
==========================================
Files 72 72
Lines 10136 10136
Branches 1336 1339 +3
==========================================
+ Hits 8890 8896 +6
+ Misses 1221 1215 -6
Partials 25 25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When the command
cdk flags --set --all --recommendedis run, and the CLI detects that a single flag needs to be modified, it always sets the value of that flag tofalse, regardless of the recommended value.This is the result of conflating this use case with the one in which the user explicitly sets a single flag to be modified, and passes no value (which defaults to
false).Differentiate these two cases, by checking whether the
--alloption was passed.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license