Skip to content
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

fix: deprecated aliases bug #1208

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Sep 30, 2024

Fix bug with deprecateAliases warning showing when flag name starts with deprecated alias.

QA

  • oclif generate my-cli
  • add this flag definition to src/commands/hello/index.ts
    'foo-bar': Flags.boolean({
      summary: 'summary',
      deprecateAliases: true,
      aliases: ['foo']
    }),
  • checkout this branch and run yarn build
  • yarn link @oclif/core in my-cli directory
  • bin/dev.js hello oclif --from me --foo-bar should not emit warning
  • bin/dev.js hello oclif --from me --foo should emit warning

Fixes #1204
@W-16866149@

Copy link

@soridalac soridalac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the changes looks good!

@mdonnalley mdonnalley merged commit 353e715 into main Oct 1, 2024
86 checks passed
@mdonnalley mdonnalley deleted the mdonnalley/deprecated-aliases-bug branch October 1, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning mistakenly displayed when using a flag that starts with a deprecated alias
2 participants