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

auth:list prints empty table when no auth'd orgs are found #1796

Closed
cristiand391 opened this issue Nov 7, 2022 · 3 comments
Closed

auth:list prints empty table when no auth'd orgs are found #1796

cristiand391 opened this issue Nov 7, 2022 · 3 comments
Labels
bug Issue or pull request that identifies or fixes a bug help wanted Help wanted to implement this issue

Comments

@cristiand391
Copy link
Member

Summary

sfdx auth:list prints an empty table when no auth'd orgs are found, previously it would just print No results found.

Seems this happened after releasing plugin-auth v2, if I re-install v1 I get the previous msg.

Steps To Reproduce:

no orgs, run sfdx auth:list on latest:
Screen Shot 2022-11-07 at 11 55 08

if you install plugin-auth v1 (sfdx plugins:install @salesforce/[email protected]):
Screen Shot 2022-11-07 at 11 55 53

System Information

{
  "cliVersion": "sfdx-cli/7.176.1",
  "architecture": "linux-x64",
  "nodeVersion": "node-v18.12.0",
  "pluginVersions": [
    "@oclif/plugin-autocomplete 1.3.5 (core)",
    "@oclif/plugin-commands 2.2.1 (core)",
    "@oclif/plugin-help 5.1.17 (core)",
    "@oclif/plugin-not-found 2.3.7 (core)",
    "@oclif/plugin-plugins 2.1.6 (core)",
    "@oclif/plugin-update 3.0.6 (core)",
    "@oclif/plugin-version 1.1.3 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.12 (core)",
    "@oclif/plugin-which 2.1.1 (core)",
    "alias 2.1.7 (core)",
    "apex 1.3.0 (core)",
    "auth 1.8.2 (user)",
    "community 2.0.14 (core)",
    "config 1.4.22 (core)",
    "custom-metadata 2.0.3 (core)",
    "data 2.1.7 (core)",
    "generator 2.0.9 (core)",
    "info 2.2.4 (core)",
    "limits 2.0.10 (core)",
    "org 2.2.11 (core)",
    "packaging 1.10.1 (core)",
    "schema 2.1.12 (core)",
    "signups 1.2.11 (core)",
    "source 2.3.0 (core)",
    "telemetry 2.0.2 (core)",
    "templates 55.1.0 (core)",
    "trust 2.0.4 (core)",
    "user 2.1.16 (core)",
    "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
    "salesforce-alm 54.8.3 (core)"
  ],
  "osVersion": "Linux 5.10.47-linuxkit",
  "shell": "bash",
  "rootPath": "/usr/local/sfdx"
}
@cristiand391 cristiand391 added the investigating We're actively investigating this issue label Nov 7, 2022
@github-actions
Copy link

github-actions bot commented Nov 7, 2022

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.

@cristiand391 cristiand391 added bug Issue or pull request that identifies or fixes a bug help wanted Help wanted to implement this issue and removed investigating We're actively investigating this issue labels Nov 7, 2022
@git2gus
Copy link

git2gus bot commented Nov 7, 2022

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

@cristiand391
Copy link
Member Author

The code for the error msg is still in the plugin:
https://github.com/salesforcecli/plugin-auth/blob/main/src/commands/auth/list.ts#L47

in the v2 of plugin-auth we moved to sfdx-core v3 so maybe the func used to get the auths changed. To make sure the command shows the error it might be better to check the length of the array returned by AuthInfo.listAllAuthorizations and print a table or the msg instead of relying on it to throw.

AuthInfo.listAllAuthorizations: https://github.com/forcedotcom/sfdx-core/blob/main/src/org/authInfo.ts#L269
noResultsFound msg: https://github.com/salesforcecli/plugin-auth/blob/main/messages/list.json#L3

I will left this marked as help wanted, please post here if you have any questions.

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 help wanted Help wanted to implement this issue
Projects
None yet
Development

No branches or pull requests

2 participants