-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(cli): aliased commands can be converted to cli args #32806
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, but I think your PR description and inline code needs to be expanded. Explain why this wasn't a problem so far (i.e. why is this PR not a fix or even p0 regression) and what (future) problem you are solving by adding aliases.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Comments on closed issues and PRs are hard for our team to see. |
This PR does not currently change CLI functionality. The function
convertToCliArgs
is not used in the CLI yet which is why this PR is not fixing a regression. It will eventually be used to strongly-type cli arguments.Previously, aliased commands, like
cdk ack
instead ofcdk acknowledge
would fall through the cracks of the generated convert function. The switch statement was only switching on command names so we would not store any options associated with an aliased command. Specifically,cdk synth --exclusively
would not store theexclusively
flag in the ensuingCliArguments
object becausesynth
is an alias.Now we do. This is an additional step forward to being able to use
CliArguments
incli.ts
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license