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

sfdx commands --json repeats commands #1777

Closed
surajp opened this issue Oct 29, 2022 · 6 comments
Closed

sfdx commands --json repeats commands #1777

surajp opened this issue Oct 29, 2022 · 6 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@surajp
Copy link

surajp commented Oct 29, 2022

Summary

Certain commands are repeated and show up in twice in the output of sfdx commands --json. This creates unncesseary clutter in my autocomplete script. Makes me wonder if source commands are repeated in multiple core plugins.

Steps To Reproduce:

  1. Run sfdx commands --json > allcommands.json
  2. Look for force:source:pull in the allcommands.json file generated above.

Expected result

The JSON for force:source:pull occurs twice in the file.

Actual result

The JSON for force:source:pull should appear only once in the file.

System Information

  • Bash in WSL2
CLI Version:
        sfdx-cli/7.172.0

 Architecture:
        wsl-x64

 Node Version:
        node-v18.3.0

 Plugin Version:
        @oclif/plugin-autocomplete 1.3.1 (core)
        @oclif/plugin-commands 2.2.1 (user)
        @oclif/plugin-help 5.1.14 (core)
        @oclif/plugin-not-found 2.3.3 (core)
        @oclif/plugin-plugins 2.1.1 (core)
        @oclif/plugin-update 3.0.2 (core)
        @oclif/plugin-version 1.1.2 (core)
        @oclif/plugin-warn-if-update-available 2.0.6 (core)
        @oclif/plugin-which 2.1.0 (core)
        alias 2.1.5 (core)
        apex 1.2.0 (core)
        auth 2.2.13 (core)
        community 2.0.3 (core)
        config 1.4.21 (core)
        custom-metadata 2.0.1 (core)
        data 2.1.4 (core)
        generator 2.0.5 (core)
        info 2.1.9 (core)
        limits 2.0.5 (core)
        org 2.2.7 (core)
        packaging 1.9.4 (core)
        schema 2.1.10 (core)
        signups 1.2.7 (core)
        source 2.0.17 (core)
        telemetry 2.0.2 (core)
        templates 55.1.0 (core)
        trust 2.0.4 (core)
        user 2.1.10 (core)
        @salesforce/sfdx-plugin-lwc-test 1.0.1 (core)
        @salesforce/sfdx-scanner 3.6.2 (user)
        salesforce-alm 54.8.1 (core)
        sfdmu 4.17.6 (user)
        sfdx-apex-typings-generator 3.0.1 (user)

 OS and Version:
        Linux 5.10.102.1-microsoft-standard-WSL2

 Shell:
        bash
@surajp surajp added the investigating We're actively investigating this issue label Oct 29, 2022
@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.

@WillieRuemmele
Copy link
Member

Hi @surajp - I was able to recreate the above behavior. This is actually an OCLIF plugin-commandslevel behavior bug, you can tell by running sfdx which commands to see which plugin a command belongs to.

cc: @mdonnalley

@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Oct 31, 2022
@git2gus
Copy link

git2gus bot commented Oct 31, 2022

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

@surajp
Copy link
Author

surajp commented Oct 31, 2022

@WillieRuemmele Thanks. I'm aware that plugin-commands is responsible for generating that output. (I install it manually for my autocomplete script to work with the new Salesforce cli ( since it doesn't seem to bundled there). However, if this is a bug with the plugin itself, why do we see this happening with only certain sets of commands (source commands, for example) and not all commands?

@WillieRuemmele
Copy link
Member

@surajp, I'm not sure why some commands are duplicated... I'd need to look into it more. However, sf should support autocomplete by running sf autocomplete and following the instructions there.

@surajp
Copy link
Author

surajp commented Nov 1, 2022

@WillieRuemmele Thank you. The script I use offers fuzzy search and more features than the standard sf autocomplete script.

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
Projects
None yet
Development

No branches or pull requests

3 participants