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

fix: change org list commands and flags to sf style #5061

Merged
merged 5 commits into from
Sep 19, 2023

Conversation

CristiCanizales
Copy link
Contributor

What does this PR do?

  • Updates Org List commands and flags to SF style in order to get rid of cli warnings

What issues does this PR fix or reference?

@W-14047399@

Changes

  • force:org:listorg:list
  • --noprompt--no-prompt
  • SFDX_JSON_TO_STDOUTSF_JSON_TO_STDOUT

Warnings before

16:12:58.917 sfdx force:org:list --clean --noprompt
(node:48030) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. Please use SF_JSON_TO_STDOUT instead.
(Use `node --trace-warnings ...` to show where the warning was created)
Warning: The "force org list" command has been deprecated. Use "org list" instead.
Warning: The "--noprompt" flag has been deprecated. Use "--no-prompt | -p" instead.

Reference: https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_delete

Copy link
Contributor

@daphne-sfdc daphne-sfdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved! 🎉

@CristiCanizales CristiCanizales merged commit b340f1d into develop Sep 19, 2023
14 checks passed
@CristiCanizales CristiCanizales deleted the cristi/org-list-warnings branch September 19, 2023 22:34
@daphne-sfdc
Copy link
Contributor

While I often run “sf org list” from the Terminal to get a list of all authorized orgs, I didn’t find a SFDX command in the command palette that explicitly points to this functionality. However, I did find that “SFDX: Remove Deleted and Expired Orgs” calls “sfdx org:list --clean --no-prompt” to display the active orgs after cleaning up the deleted and expired orgs.

With this limitation in mind, these are the steps I took to test:

*** NOTE: When I started doing the testing, I had several expired scratch orgs on my computer.

  1. Create a new project.
  2. Run “SFDX: Authorize an Org”. Authorize my dev org.
  3. Run “SFDX: Authorize a Dev Hub”. Authorize my dev org.
  4. Run “SFDX: Remove Deleted and Expired Orgs” to clean up the expired scratch orgs.
    • Make sure my dev org is listed in the Output tab as the default org and the default dev hub. ✅
  5. Run “SFDX: Create a Default Scratch Org”.
  6. Run “SFDX: Delete Default Org” to delete the scratch org.
  7. Run “SFDX: Remove Deleted and Expired Orgs” to clean up the deleted scratch org.
    • Make sure my dev org is listed in the Output tab as the default dev hub. ✅
  8. Run “SFDX: Log Out from All Authorized Orgs”.
  9. Run “SFDX: Remove Deleted and Expired Orgs” - there should be no orgs to clean up.
    • Make sure there are no orgs listed in the Output tab. ✅

While doing this testing, I did not see any warnings for the variables that were changed in this PR. Therefore, the org list warnings are successfully removed in this code change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants