Skip to content

fix(flags): running cdk flags --set without additional options should fail #832

@iankhou

Description

@iankhou

Describe the bug

If cdk flags is run with only --set, or only --set --recommended it should require option --all or --unconfigured.

Currently, the commands below complete but don't do anything:

cdk flag --unstable=flags --set


cdk flags --unstable=flags --set --recommended

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

Command failure at yargs.

Current Behavior

Command completes as a no-op.

Reproduction Steps

# In your CDK app directory, run the command below
cdk flags --unstable=flags --set --recommended

or the following

cdk flag --unstable=flags --set

Possible Solution

Validation at yargs to ensure that --set is run with additional options.

Additional Information/Context

No response

CDK CLI Version

2.1027.0 (build 5fc1b13)

Framework Version

No response

Node.js Version

20.19.4

OS

MacOS 15.6 (24G84)

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions