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

EOL problem and incompatibility on windows for dev generate command/flag #2051

Closed
KevinGossentCap opened this issue Apr 11, 2023 · 2 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@KevinGossentCap
Copy link

Summary

The 2 commands "sf dev generate command" and "sf dev generate flag" are not EOL compatible on windows platform.
the first one creates the "command" from template with UNIX EOL style and the "flag" readlines based on fs.EOL so windows style.

Steps To Reproduce:

  1. Use a windows machine.
  2. Initiate a new sfdx plugins with "sf dev generate command"
  3. try to add any flag with "sf dev generate flag"
  4. see the error

Expected result

Coherent behavior between the two commands.

Actual result

Code error and all additions of "flag" are at the beginning of the command file.

System Information

  • Which shell/terminal are you using? (e.g. bash, zsh, powershell 5, powershell 7, cmd.exe, etc.)
    Powershell 7.3.3

  • If you are using sfdx

    • Run sfdx version --verbose --json
  • If you are using sf

    • Run sf version --verbose --json
  • Paste the output here (Happens with both sfdx and sf)
    {
    "cliVersion": "sfdx-cli/7.196.5",
    "architecture": "win32-x64",
    "nodeVersion": "node-v18.15.0",
    "osVersion": "Windows_NT 10.0.19044",
    "shell": "cmd.exe",
    "rootPath": "C:\KGO_Tools\node-v18-win-x64\node_modules\sfdx-cli",
    "pluginVersions": [
    "@copado/copado-cli 1.1.19 (user)",
    "@oclif/plugin-autocomplete 2.1.8 (core)",
    "@oclif/plugin-commands 2.2.13 (core)",
    "@oclif/plugin-help 5.2.9 (core)",
    "@oclif/plugin-not-found 2.3.23 (core)",
    "@oclif/plugin-plugins 2.4.4 (core)",
    "@oclif/plugin-search 0.0.15 (core)",
    "@oclif/plugin-update 3.1.9 (core)",
    "@oclif/plugin-version 1.3.2 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.33 (core)",
    "@oclif/plugin-which 2.2.18 (core)",
    "apex 2.2.10 (core)",
    "auth 2.7.11 (core)",
    "community 2.2.9 (core)",
    "custom-metadata 2.1.11 (core)",
    "data 2.3.9 (core)",
    "deploy-retrieve 1.8.8 (core)",
    "dev 0.7.0 (user)",
    "info 2.6.4 (core)",
    "limits 2.3.12 (core)",
    "org 2.6.5 (core)",
    "packaging 1.16.3 (core)",
    "schema 2.3.6 (core)",
    "settings 1.4.3 (core)",
    "signups 1.4.11 (core)",
    "source 2.9.1 (core)",
    "telemetry 2.1.3 (core)",
    "templates 55.4.5 (core)",
    "trust 2.4.6 (core)",
    "user 2.3.7 (core)",
    "@salesforce/sfdx-diff 0.0.6 (user)",
    "@salesforce/sfdx-plugin-lwc-test 1.0.1 (core)",
    "sfdx-cli 7.196.5 (core)",
    "sfdx-hardis 3.13.0 (user)",
    "sfdx-kgo-plugin 0.0.24 (link) C:\GitRepos\sfdx-kgo-plugin"
    ]
    }
    {
    "cliVersion": "@salesforce/cli/1.73.0",
    "architecture": "win32-x64",
    "nodeVersion": "node-v18.15.0",
    "osVersion": "Windows_NT 10.0.19044",
    "shell": "cmd.exe",
    "rootPath": "C:\KGO_Tools\node-v18-win-x64\node_modules\@salesforce\cli",
    "pluginVersions": [
    "@oclif/plugin-autocomplete 2.1.8 (core)",
    "@oclif/plugin-commands 2.2.13 (core)",
    "@oclif/plugin-help 5.2.9 (core)",
    "@oclif/plugin-not-found 2.3.23 (core)",
    "@oclif/plugin-plugins 2.4.4 (core)",
    "@oclif/plugin-search 0.0.15 (core)",
    "@oclif/plugin-update 3.1.9 (core)",
    "@oclif/plugin-version 1.3.2 (core)",
    "@oclif/plugin-warn-if-update-available 2.0.33 (core)",
    "@oclif/plugin-which 2.2.18 (core)",
    "@salesforce/cli 1.73.0 (core)",
    "apex 2.2.9 (core)",
    "auth 2.7.11 (core)",
    "data 2.3.9 (core)",
    "deploy-retrieve 1.8.8 (core)",
    "dev 0.7.0 (user)",
    "info 2.6.4 (core)",
    "limits 2.3.12 (core)",
    "login 1.2.5 (core)",
    "org 2.6.5 (core)",
    "schema 2.3.6 (core)",
    "settings 1.4.3 (core)",
    "sobject 0.1.14 (core)",
    "source 2.9.1 (core)",
    "telemetry 2.1.3 (core)",
    "templates 55.4.5 (core)",
    "trust 2.4.6 (core)",
    "user 2.3.7 (core)"
    ]
    }

Additional information

Feel free to attach a screenshot.

@KevinGossentCap KevinGossentCap added the investigating We're actively investigating this issue label Apr 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.

@KevinGossentCap KevinGossentCap changed the title EOL problem and incompatibility on widonws for dev generate command/flag EOL problem and incompatibility on windows for dev generate command/flag Apr 11, 2023
@WillieRuemmele WillieRuemmele added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Apr 11, 2023
@git2gus
Copy link

git2gus bot commented Apr 11, 2023

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

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