Sl/W-18067456 - fix org logout fails username#1282
Merged
Conversation
WillieRuemmele
requested changes
Apr 14, 2025
Contributor
QA Notes✅ : now throws error when logging out of non-auth'd / existing org ➜ dreamhouse-agents git:(main) ✗ hub:(GLOBAL - DevHub) scratch:(afdx-usa1000-jwt)
➜ sf org logout -o abc --json
{
"status": 0,
"result": [
"abc"
],
"warnings": []
}
➜ dreamhouse-agents git:(main) ✗ hub:(GLOBAL - DevHub) scratch:(afdx-usa1000-jwt)
➜ ../../oss/plugin-auth/bin/run.js org logout -o abc --json
{
"name": "NamedOrgNotFoundError",
"message": "Parsing --target-org \n\tNo authorization information found for abc.\nSee more help with --help",
"exitCode": 1,
"actions": [
"It looks like you mistyped the username or alias. Did you mean \"apb\"?"
],
|
Contributor
QA Notes✅ : non-breaking changes with warning ➜ ../../oss/plugin-auth/bin/run.js org logout -o abc
Warning: No authenticated org found with the username or alias of abc.
Successfully logged out of orgs: abc
➜ agent hub:(GLOBAL - DevHub) scratch:(epic.be999e47ad96@orgfarm.out)
➜ ../../oss/plugin-auth/bin/run.js org logout -o abc --json
{
"status": 0,
"result": [
"abc"
],
"warnings": [
{
"message": "No authenticated org found with the username or alias of abc.",
"name": "NoAuthFoundForTargetOrgWarning"
}
]
} |
Co-authored-by: Juliet Shackell <63259011+jshackell-sfdc@users.noreply.github.com>
WillieRuemmele
approved these changes
Apr 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
fix the issue: Warning users when using
sf org logout --target-org >username<without authenticated org correctly.Step to Reproduce:
Issue:
sf org logout -o hahaactual result: Successfully logged out of orgs:
hahaExpected Result:
Warning: No authenticated org found with the username or alias of haha.What issues does this PR fix or reference?
@W-18067456@
More details: [forcedotcom/cli/issues/3247]