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

head command returns exit code 0 even on 404 #100

Open
ericjs opened this issue Nov 17, 2015 · 1 comment
Open

head command returns exit code 0 even on 404 #100

ericjs opened this issue Nov 17, 2015 · 1 comment

Comments

@ericjs
Copy link

ericjs commented Nov 17, 2015

If I run

aws head MY_BUCKET/some_object_that_doesnt_exist

I get

404 Not Found

(to stderr) however, if I then run

echo $?

I get

0

Just as I do when perform aws head on an object that does exist.

@timkay
Copy link
Owner

timkay commented Nov 17, 2015

Try adding --fail, which is passed on to curl.

On Mon, Nov 16, 2015 at 4:09 PM, Eric [email protected] wrote:

If I run
'''bash
aws head MY_BUCKET/some_object_that_doesnt_exist
'''
I get
'''bash
404 Not Found
'''
(to stderr) however, if I then run
'''bash
echo $?
'''
I get
'''bash
0
'''
Just as I do when perform aws head on an object that does exist.


Reply to this email directly or view it on GitHub
#100.

Tim Kay
m: +1-650-248-0123
Skype: timkay

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