-
-
Notifications
You must be signed in to change notification settings - Fork 1
fix: fail on bootstrap download error #59
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
Conversation
This addresses a situation where a network glitch can cause a single file in the bootstrap to fail to download, but the bootstrap itself would continue. This tended to lead to strange site issues with missing files, which can be hard to trace. Fixes: #58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -58,7 +58,7 @@ function _bootstrap_download() { | |||
curl -H "Cache-Control: no-cache" -fs "https://raw.githubusercontent.com/keymanapp/shared-sites/$BOOTSTRAP_VERSION/$remote_file" -o "$local_file" || ( | |||
_bootstrap_echo "FATAL: Failed to download $remote_file" | |||
exit 3 | |||
) | |||
) || exit $? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is exit 3
not doing anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It exits the subshell (...)
but because it's in a pipe it doesn't fail the entire command. I didn't want to use set -o pipefail
because of other possible side-effects
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Note: given this change impacts only deployment, I am not preparing a new release for this PR. We can do a new release when we have other changes to deploy. |
This addresses a situation where a network glitch can cause a single file in the bootstrap to fail to download, but the bootstrap itself would continue. This tended to lead to strange site issues with missing files, which can be hard to trace.
Fixes: #58