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

Use correct exit status on failure #103

Closed
hadley opened this issue Jun 26, 2014 · 2 comments
Closed

Use correct exit status on failure #103

hadley opened this issue Jun 26, 2014 · 2 comments
Labels

Comments

@hadley
Copy link

hadley commented Jun 26, 2014

e.g.:

adv-r (master): s3_website push --headless
ERROR: s3_website push was called with arguments ["--headless"]
Usage: "s3_website push".
adv-r (master): echo $?
0

Should be non-zero to indicate failure. This made me believe that s3_website was cheerfully working for weeks when in fact it was just failing silently :(

@laurilehmijoki
Copy link
Owner

Hi and thanks for reporting this bug. You are absolutely right. The exit status should be non-zero in your case.

I've fixed this problem in the version 2.1.12. Here is the commit: 60b3cf8.

The bug was caused by an unexpected behaviour in Thor. For more discussion on this unexpected exit status, see rails/thor#244.

As a side note, if you have been using the version 1 of s3_website, please read the release note on the version 2. The --headless switch no longer exists in that version. There are other backward incompatible changes as well.

@laurilehmijoki
Copy link
Owner

If you want to continue using the v1 of s3_website, just specify ~> 1 in your Gemfile.

In general, it is a good practice to specify the major version number of a semantically versioned tool. s3_website is semantically versioned.

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

No branches or pull requests

2 participants