-
Notifications
You must be signed in to change notification settings - Fork 78
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 package install
always outputs to stderr
even when the operation is successful
#2004
Comments
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. |
Hey @dribb-sprout, thanks for the issue. That is odd.
|
Hi @iowillhoit - Thanks for looking into this!
|
@iowillhoit - I did a little digging and I think this line in the It looks like the I imagine that other commands that use that |
This issue has been linked to a new work item: W-12726817 |
Awesome, thank you for the additional detail @dribb-sprout ! We'll get it looked at. |
@dribb-sprout I was looking at this issue and tried to reproduced so I might find a fix. However I cannot reproduce the behavior. Using sfdx-cli/7.191.1 I ran
The progress reported by the install is being written to stderr (as described above), but I am getting the final result redirected to a file. |
This was fixed a few releases ago. Please reopen if you are still seeing the problem after updating your CLI to the latest. |
Summary
When using the
sfdx package install
command to install packages in scratch orgs, the output is always returned tostderr
, even when the installation operation succeeds without errors.This causes issues when using these commands in CI/CD pipelines, scripts, etc, that expect commands to output to
stdout
for success andstderr
for errors/failures.This does NOT appear to be the case when using other commands (such as
sfdx package install report
), meaning the output is successfully sent tostdout
.Steps To Reproduce:
sfdx force org create --setalias dev-test -f config/project-scratch-def.json
sfdx package install --package 04t4R000001RcTAQA0 -o dev-test --no-prompt --wait 60 > stdout.txt
sfdx package install --package 04t4R000001RcTAQA0 -o dev-test --no-prompt --wait 60 2> stderr.txt
Expected result
When the operation is successful, I would expect the output to go to
stdout
and notstderr
.Actual result
The output is returned to
stderr
.System Information
Which shell/terminal are you using?
If you are using
sfdx
sfdx version --verbose --json
If you are using
sf
sf version --verbose --json
Paste the output here: sfdx-cli/7.190.2 darwin-x64 node-v18.14.1
The text was updated successfully, but these errors were encountered: