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

error in stdout not stderr #2187

Closed
andreineculau opened this issue Sep 21, 2016 · 5 comments
Closed

error in stdout not stderr #2187

andreineculau opened this issue Sep 21, 2016 · 5 comments
Labels
bug This issue is a bug.

Comments

@andreineculau
Copy link

andreineculau commented Sep 21, 2016

I have discovered that a failing "aws s3 cp" for instance that ends up in error "Transfer failed: An error occurred (404).." outputs that line in stdout, not stderr. The same might apply to other aws-cli commands.

Context: aws s3 cp s3://... - i.e. outputting the object to stdout

@andreineculau
Copy link
Author

By change, I have now found that this is a regression, since it was supposedly fixed in #820.

An implicit bug is also back: --quiet can silences errors!

@JordonPhillips
Copy link
Member

What version of the CLI are you using? Running the following results in nothing being displayed:

aws s3 cp . s3://bucket-that-does-not-exist/ 2> /dev/null

This is on the most recent version of the CLI. --quiet suppressing error output is intentional, use --only-show-errors to continue showing them while suppressing other output.

@JordonPhillips JordonPhillips added question closing-soon This issue will automatically close in 4 days unless further comments are made. labels Sep 23, 2016
@andreineculau
Copy link
Author

aws-cli/1.10.64 Python/2.7.10 Darwin/15.6.0 botocore/1.4.54

running

$ aws s3 cp s3://bucket-that-exists/object-that-does-not-exist - 2>/dev/null
Transfer failed: An error occurred (404) when calling the HeadObject
operation: Not Found

$ aws s3 cp s3://bucket-that-exists/object-that-does-not-exist
filename 2>/dev/null
Completed 1 part(s) with ... file(s) remaining

this one would have printed to stderr

An error occurred (404) when calling the HeadObject operation: Key

"object-that-does-not-exist" does not exist

So I guess a problem with the "-" (use stdout) case.

On Fri, Sep 23, 2016 at 7:05 PM, Jordon Phillips notifications@github.com
wrote:

What version of the CLI are you using? Running the following results in
nothing being displayed:

aws s3 cp . s3://bucket-that-does-not-exist/ 2> /dev/null

This is on the most recent version of the CLI. --quiet suppressing error
output is intentional, use --only-show-errors to continue showing them
while suppressing other output.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2187 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AArOQSLhfQSEFMjNNocblKtro2haIPXqks5qtAbNgaJpZM4KCnTp
.

andreineculau.com http://www.andreineculau.com

@JordonPhillips
Copy link
Member

I've confirmed the issue, thanks for reporting!

@JordonPhillips JordonPhillips added bug This issue is a bug. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. question labels Sep 23, 2016
JordonPhillips added a commit to JordonPhillips/aws-cli that referenced this issue Sep 23, 2016
`uni_print` prints out to stdout by default, but we need to print
to stderr when things go wrong.

Fixes aws#2187
@jamesls
Copy link
Member

jamesls commented Oct 6, 2016

Confirmed fixed on the latest version of the CLI:

$ aws s3 cp s3://jamesls-test-sync/object-that-does-not-exist - 2>/dev/null
$ echo $?
1

@jamesls jamesls closed this as completed Oct 6, 2016
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
aws#2187)

* feat: Added the option to hide progress bars during s3 upload for simplicity through --no-progressbar

* Used a black version in sync with AppVeyor

* Resolved conflict to get in sync with the newest change

* Revised based on code review

* Added integration test for progressbar option

* Changed parameterized integ test parameter type
thoward-godaddy pushed a commit to thoward-godaddy/aws-cli that referenced this issue Feb 12, 2022
* feat: Added the option to hide progress bars during s3 upload for simplicity through --no-progressbar

* Used a black version in sync with AppVeyor

* Resolved conflict to get in sync with the newest change

* Revised based on code review

* Added integration test for progressbar option

* Changed parameterized integ test parameter type

* Fixed an error with previous merge

* Removed a flush operation for s3uploader
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

No branches or pull requests

3 participants