You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
sfdx non:existing:command gives exit code 0 if run in scripts (no terminal / stdin attached)
Steps To Reproduce in Bash terminal:
sfdx non:existing:command 0<&- The command 0<&- tells to block input from stdin like it would work in CI/automations. Only put it to test interactively.
echo $? # gives 0 (zero).
Steps To Reproduce in cmd.exe:
sfdx non:existing:command <nul The command <nul tells to block input from stdin like it would work in CI/automations. Only put it to test interactively.
echo %errorlevel% # gives 0 (zero).
Expected result
Exit code must be non-zero, as it's typo or missing plugin.
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.
Summary
sfdx non:existing:command gives exit code 0 if run in scripts (no terminal / stdin attached)
Steps To Reproduce in Bash terminal:
sfdx non:existing:command 0<&-
The command0<&-
tells to block input from stdin like it would work in CI/automations. Only put it to test interactively.echo $?
# gives 0 (zero).Steps To Reproduce in cmd.exe:
sfdx non:existing:command <nul
The command<nul
tells to block input from stdin like it would work in CI/automations. Only put it to test interactively.echo %errorlevel%
# gives 0 (zero).Expected result
Exit code must be non-zero, as it's typo or missing plugin.
Actual result
Exit code is 0.
System Information
Reproduced in bash and cmd.exe
sfdx version --verbose --json
{
"cliVersion": "sfdx-cli/7.158.1",
"architecture": "wsl-x64",
"nodeVersion": "node-v14.17.6",
"pluginVersions": [
"@oclif/plugin-autocomplete 0.3.0 (core)",
"@oclif/plugin-commands 1.3.0 (core)",
"@oclif/plugin-help 3.3.1 (core)",
"@oclif/plugin-not-found 1.2.6 (core)",
"@oclif/plugin-plugins 1.10.11 (core)",
"@oclif/plugin-update 1.5.0 (core)",
"@oclif/plugin-warn-if-update-available 1.7.3 (core)",
"@oclif/plugin-which 1.0.4 (core)",
"@salesforce/sfdx-plugin-lwc-test 1.0.0 (core)",
"alias 2.1.0 (core)",
"apex 0.13.0 (core)",
"auth 2.2.2 (core)",
"community 2.0.0 (core)",
"config 1.4.12 (core)",
"custom-metadata 2.0.0 (core)",
"data 2.0.4 (core)",
"generator 2.0.2 (core)",
"info 2.0.1 (core)",
"limits 2.0.1 (core)",
"org 2.0.1 (core)",
"salesforce-alm 54.6.2 (core)",
"schema 2.1.1 (core)",
"sfdx-cli 7.158.1 (core)",
"sfdx-git-delta 5.2.0 (5.2.0)",
"sfpowerkit 4.2.9 (4.2.9)",
"signups 1.2.0 (core)",
"source 2.0.3 (core)",
"telemetry 2.0.0 (core)",
"templates 55.0.0 (core)",
"trust 2.0.1 (core)",
"user 2.1.0 (core)"
],
"osVersion": "Linux 5.4.72-microsoft-standard-WSL2"
}
The text was updated successfully, but these errors were encountered: