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

deprecated property does not work when = is used to provide value #586

Closed
mdonnalley opened this issue Jan 9, 2023 · 4 comments · Fixed by #539 or #588
Closed

deprecated property does not work when = is used to provide value #586

mdonnalley opened this issue Jan 9, 2023 · 4 comments · Fixed by #539 or #588

Comments

@mdonnalley
Copy link
Contributor

mdonnalley commented Jan 9, 2023

If deprecated is set to true for a flag and the user provides the value using =, e.g. my-flag=value, the deprecation warning will not be emitted.

@mdonnalley mdonnalley changed the title warnIfFlagDeprecated property does not work when = is used to provide value deprecated property does not work when = is used to provide value Jan 10, 2023
@mdonnalley
Copy link
Contributor Author

@jayree I wasn't able to reproduce this error that you mentioned to @shetzel - are you able to provide more details and/or steps to reproduce? Thanks!

@jayree
Copy link
Contributor

jayree commented Jan 10, 2023

@mdonnalley does that make it clearer?:

❯ sfdx limits:api:display --apiversion=52.0
 Name                                        Remaining Max
 ─────────────────────────────────────────── ───────── ─────────
❯ sfdx limits:api:display --apiversion 52.0
Warning: The "--apiversion" flag has been deprecated. Use "--api-version" instead.
 Name                                        Remaining Max
 ─────────────────────────────────────────── ───────── ─────────

@jayree
Copy link
Contributor

jayree commented Jan 10, 2023

@mdonnalley this replacement might work:

// const foundAliases = this.argv.filter(a => aliases.includes(a));
const foundAliases = aliases.filter(alias => this.argv.some(a => a.startsWith(alias)))

@mdonnalley
Copy link
Contributor Author

mdonnalley commented Jan 10, 2023

@jayree Thanks - looks like the issue is with the deprecateAliases property, not the deprecate property

And your fix works - thank you for the suggestion

This was referenced Jan 10, 2023
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 a pull request may close this issue.

2 participants