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

sf org logout does not display org list (interactive) when target-org config var is set #2128

Closed
alan-morey opened this issue May 11, 2023 · 2 comments
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue

Comments

@alan-morey
Copy link

Summary

When executing sf org logout with no flags, the command does not display a list of orgs to interactively logout of, if the config variable target-org is set.

The command help description says:

If you run this command with no flags, it first displays a list of orgs you've created or logged into, with none of the orgs selected. Use the arrow keys to scroll through the list and the space bar to select the orgs you want to log out of. Press Enter when you're done; the command asks for a final confirmation before logging out of the selected orgs.

So I was surprised to see it prompt for confirmation to logout of my configured target-org as I was expecting the list of orgs to choose from.

This may be as designed, so maybe the help description just needs to be updated to explain this.

Maybe introducing an additional flag, e.g. --interactive, so that users could explicitly get to this interactive prompt that displays the list of orgs to choose from, even when target-org is set.

Steps To Reproduce:

  1. Set target-org config variable
$ sf config set target-org=my-org
Set Config
==============================
| Name       Value     Success 
| ────────── ───────── ─────── 
| target-org my-org    true
  1. Execute command with no flags: sf org logout

Expected result

Interactive list of orgs displayed allowing me to choose which org to logout of.

Actual result

Confirmation prompt is displayed asking if I want to logout of my configured target-org:

? Are you sure you want to log out of [email protected]?

System Information

 CLI Version:
        @salesforce/cli/1.77.6

 Architecture:
        linux-x64

 Node Version:
        node-v18.16.0

 Plugin Version:
        @oclif/plugin-autocomplete 2.1.9 (core)
        @oclif/plugin-commands 2.2.14 (core)
        @oclif/plugin-help 5.2.9 (core)
        @oclif/plugin-not-found 2.3.23 (core)
        @oclif/plugin-plugins 3.0.1 (core)
        @oclif/plugin-search 0.0.17 (core)
        @oclif/plugin-update 3.1.13 (core)
        @oclif/plugin-version 1.3.3 (core)
        @oclif/plugin-warn-if-update-available 2.0.36 (core)
        @oclif/plugin-which 2.2.19 (core)
        @salesforce/cli 1.77.6 (core)
        apex 2.2.15 (core)
        auth 2.7.14 (core)
        data 2.3.14 (core)
        deploy-retrieve 1.8.18 (core)
        info 2.6.10 (core)
        limits 2.3.13 (core)
        login 1.2.8 (core)
        org 2.7.3 (core)
        schema 2.3.10 (core)
        settings 1.4.6 (core)
        signups 1.4.14 (user)
        sobject 0.1.18 (core)
        source 2.10.7 (core)
        telemetry 2.2.0 (core)
        templates 55.4.13 (core)
        trust 2.4.14 (core)
        user 2.3.10 (core)
        gr-sfdx-plugin 0.0.0 (link) /home/alan.morey/repos/salesforce/gr-sfdx-plugin

 OS and Version:
        Linux 5.19.0-40-generic

 Shell:
        zsh

 Root Path:
        /home/alan.morey/.npm-packages/lib/node_modules/@salesforce/cli

Additional information

Clearing the target-org config variable and running the command with no flags displays the interactive org list as expected.

@alan-morey alan-morey added the investigating We're actively investigating this issue label May 11, 2023
@github-actions
Copy link

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.

@mshanemc mshanemc added the bug Issue or pull request that identifies or fixes a bug label May 11, 2023
@git2gus
Copy link

git2gus bot commented May 11, 2023

This issue has been linked to a new work item: W-13192405

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug investigating We're actively investigating this issue
Projects
None yet
Development

No branches or pull requests

2 participants