Closed pandayashasvi closed 1 month ago
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.
Hey @pandayashasvi, you need to wrap your alias (--target-org
) in double quotes. Otherwise it gets parsed as two separate arguments.
Like so:
> sf org logout --target-org "test org"
Warning: If you log out of a scratch org without having access to its password, you can't access this org again, either through the CLI or the Salesforce UI.
? Are you sure you want to log out of test-dyptbs11glfe@example.com? yes
Successfully logged out of orgs: test-dyptbs11glfe@example.com
This is an all around best-practice when passing strings with spaces on the command line. To avoid needed quotes, you can use a hyphen instead. For example: --alias personal-org
@iowillhoit Thanks for this information, i thought it was a bug. But Thank you so much.
Summary
If Alias name of Salesforce org in VS code have space then
sf org logout
command is not working.Steps To Reproduce
sf org logout --target-org personal org --no-prompt
But if we try same with a alias having no space then it is working correctly. Also it is working correctly if we use username instead of alias.
I think we should either restrict to not have space in alias or resolve this thing.
Expected result
sf org logout --target-org personal org --no-prompt
command should run as per documentation we can use alias name for this command.Actual result
Error (2): Unexpected argument: org
System Information
I am using powershell.
Additional information