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

Exit value for "s3cmd ls" #219

Closed
victor73 opened this issue Sep 4, 2013 · 3 comments
Closed

Exit value for "s3cmd ls" #219

victor73 opened this issue Sep 4, 2013 · 3 comments

Comments

@victor73
Copy link

victor73 commented Sep 4, 2013

$ s3cmd ls s3://path/to/non-existent/object

returns 0. This means that s3cmd ls cannot be used to check if a particular object exists in a bucket or not.

@mdomsch
Copy link
Contributor

mdomsch commented May 8, 2014

https://github.com/mdomsch/s3cmd/tree/bug/exitcodes
has a stab at adding proper exit codes to s3cmd. This attempts to address bug #19, #65, and #219 from a systematic POV.

If you hate using s3cmd because is almost always returned exit code 0 regardless, please take a look at this (short) branch and comment.

Thanks,
Matt

@mdomsch
Copy link
Contributor

mdomsch commented May 9, 2014

pushed to master branch now. Please try and comment.

@mdomsch mdomsch closed this as completed May 9, 2014
@mdomsch
Copy link
Contributor

mdomsch commented May 9, 2014

./s3cmd ls s3://mdomsch-does-not-exist.domsch.com/
ERROR: Bucket 'mdomsch-does-not-exist.domsch.com' does not exist
ERROR: S3 error: 404 (NoSuchBucket): The specified bucket does not exist
[mdomsch@pws490 s3cmd (upstream-master)]$ echo $?
70

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants