Repository navigation
feat: Add a curl | bash bootstrap installer - #40
Merged
Merged
Conversation
curl -fsSL https://raw.githubusercontent.com/rubyists/sv-helper/main/bootstrap/install.sh | bash bootstrap/install.sh installs a published release. It resolves VERSION (v4.2.0 or 4.2.0), or the latest tag, once. It downloads that release's archive for Linux or macOS and checks it against the release's own SHA256SUMS. When packslip is installed, it also verifies the signature against the release workflow's identity. Then it runs the install.sh inside the archive with any arguments after `bash -s --`, and with the environment, so PREFIX and DESTDIR work as they do there. Nothing about how releases are built changes. A mismatch, a missing checksum entry or a failed signature installs nothing. A release that doesn't exist, an unsupported OS and a missing tool are each named, with their own exit status. A failing install.sh exits with its own status. It never escalates privilege. Downloads are HTTPS only, redirects included. The temporary directory goes on success, failure or interrupt. Nothing runs until the last line calls main, so a truncated download does nothing. test/bootstrap.bats installs from a payload built with ci/build_release_payload.sh and served over file://, with no network. A fake packslip and a fake uname cover the signature and platform paths. Closes #39 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bougyman
approved these changes
Oct 5, 2026
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.
Closes #39.
bootstrap/install.shdownloads a published release, verifies it, and runs theinstall.shinside it. Nothing about how releases are built or published changes. It lives underbootstrap/because the rootinstall.shis the installer inside the archive.What it does
VERSION(v4.2.0or4.2.0), or the tag GitHub's/releases/latestredirects to.SHA256SUMSandsv-helper-linux.tar.gzorsv-helper-darwin.tar.gz, over HTTPS only, redirects included.SHA256SUMS.packslipis onPATH, verifies the signature against.github/workflows/main.yaml@. Otherwise it says the signature wasn't checked.install.sh "$@", with the environment passed through, soPREFIXandDESTDIRwork.Exit statuses: 2 missing tool, 3 unsupported OS, 4 no such or invalid release, 5 download failed, 6 verification failed, 7 unpack failed, 8 no temp dir. Otherwise it exits with
install.sh's own status. Nothing runs until the last line callsmain, so a truncated download does nothing.Written in bash in your style: no semicolons, no
set -euo pipefail, and every command checked withif,if !, or a|| {block.Checked against the real releases
Run through a pipe, as users will run it, against GitHub on this host:
svls --versionreports 4.2.0VERSION=4.0.0passed real packslip signature verification and installedVERSION=v3.5.0, which has no assets, gets a 404 that's named, exit 4VERSION=v.0.1is refused before any download, exit 4Tests
test/bootstrap.bats(15 tests) installs from a payload built withci/build_release_payload.shand served overfile://, with no network. Covered:v-less version, andPREFIXfrom the environmentSHA256SUMSuname)install.sh's own exit statusmain, and truncation inside itResolving "latest" needs GitHub's redirect, so the suite doesn't cover it. I checked it by hand above.
make testpasses locally (135 tests).🤖 Generated with Claude Code