fix(repo): report download failures in install.sh - #3041
Merged
kopernic-pl merged 1 commit intoAug 27, 2026
Merged
Conversation
kopernic-pl
force-pushed
the
bugfix/install-sh-error-reporting
branch
from
August 26, 2026 16:16
60cc6e5 to
7709994
Compare
There was a problem hiding this comment.
Pull request overview
Fixes silent installer failures by routing curl connection errors through the existing error path.
Changes:
- Handles failed downloads without premature
set -etermination. - Corrects HTTP status validation and safely removes missing files.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
kopernic-pl
approved these changes
Aug 26, 2026
micryc
approved these changes
Aug 27, 2026
A connection-level failure (DNS, refused, TLS, timeout) left the script exiting with curl's status and no message, because set -eu terminates on the assignment before the status check runs. Bind the failure to 000 so the existing error branch is reached. The lower bound in that check never took effect either: a single & backgrounds the first test and discards its result, leaving the condition as -le 308 alone. It only becomes reachable once the curl failure stops exiting early, so both change together. rm in the error branch also failed when curl never created the output file, terminating the script before the message it was about to print. Use rm -f.
kopernic-pl
force-pushed
the
bugfix/install-sh-error-reporting
branch
from
August 27, 2026 09:09
7709994 to
168a76e
Compare
kopernic-pl
enabled auto-merge (squash)
August 27, 2026 09:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3040.
Checklist
Does this PR introduce a breaking change?
Additional context
Three lines in the download block combined to swallow connection-level failures, so
curl -L .../install.sh | shexited non-zero with no explanation at all. Reasoning is in #3040.|| STATUS=000stopsset -eufrom terminating on the assignment, so a curl failure now falls through to the error branch that already exists instead of exiting with curl's own status.&→&&makes the lower bound actually apply. With&the first test is backgrounded and its result discarded, leaving the condition as-le 308alone — which would accept000as success once the line above stops exiting early. The two have to change together.rm -flets the error branch finish when curl never created the output file; previouslyrmfailed there andset -ekilled the script before the message on the next line.The two quoting changes sit on lines already being touched and clear the remaining shellcheck notes.
Verification
exit 6, no outputError requesting. Download binary from <URL>,exit 1Commands and output
shellcheckon this file goes from 5 findings to 0, including the one it classifies as an error:No tests are included — there's no harness for the shell installer, and reproducing the failure needs a network-isolated container. Happy to add coverage if you'd like it.