fix: source /etc/os-release in a subshell — it clobbers $VERSION #5
No reviewers
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:bootstrap
scope:coolify
scope:db
scope:docs
scope:drill
scope:installer
scope:labels
scope:platform
scope:runner
scope:users
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/rig#5
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/os-release-clobbers-version"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The bug
rig runner installfails on Debian 13 at the download step:Hit live on the CX43 ci-runner bootstrap (first real run of the PR #3 + #4 path).
runner-install.shsources/etc/os-releasein the main shell for the Debian-family guard. On Debian that file definesVERSION="13 (trixie)", which silently overwrites the script's own$VERSION:[ -z "$VERSION" ]latest-release resolution is skipped entirely and the OS string is spliced into the download URL;--version <pin>, the pin is clobbered the same way — guards run after arg parsing, so there is no working invocation on Debian.The fix
Read
ID/ID_LIKEvia a$( . /etc/os-release && printf … )subshell so nothing leaks into the script's namespace. Applied tobootstrap.shtoo — same pattern, no colliding variable today, same landmine.Added a harness check that fails on any future main-shell sourcing of
/etc/os-releaseundercommands/.Verification
bash test/cli.sh→ 28 passed, 0 failed (incl. the new guard)releases/latestredirect →2.335.1→ tarball URL answers 302🤖 Generated with Claude Code