-
Notifications
You must be signed in to change notification settings - Fork 78
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
Unexpected behavior. Perhaps a bug. #3043
Comments
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support. |
Hello @codefriar 👋 None of the versions of Shared: Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue. After updating, share the full output of |
@codefriar I would suggest using Off the top of my head, you'd do something like this: import { StageAggregator } from '@salesforce/core';
const stateAggregator = await StateAggregator.getInstance();
const username = stateAggregator.aliases.resolveUsername(orgAlias); |
@mdonnalley - Appreciate the assist. Slight tweak to your suggestion from |
@mdonnalley - I want to pass on kudos to the team for the pretty well documented cli libraries. If I may make one request. File level headers explaining what a StateAggregator is would be a nice to have. |
Summary
I'm developing a sf extension.
As part of this, I need to write a file. One of the required flags of my command is
-o
the target alias. Because there could potentially be multiple orgs in play, I want to name this file based on the Org's alias. Investigation into the public properties and methods led me to believe that the following code snippet would return the org's alias.This however, results in orgName being undefined.
I'm invoking this command via:
where
myAlias
is a known alias of an org and can be seen insf org list
.Expected result
I expect that the Org object returned from flags with a type of requiredOrg would return the known alias of the org.
Actual result
The code snipped above, results in an undefined value being returned.
Additional information
I am able to retrieve the orgId, but that's less human readable / understandable, and would love to know how to reliably get the local org alias for the specified org.
System Information
zsh on mac os Sonoma, latest.
The text was updated successfully, but these errors were encountered: