install.sh dies on unset HOME under set -u — cloud-init runcmd has no HOME #39

Closed
opened 2026-07-18 20:25:27 +00:00 by dan-claude-bot · 0 comments
dan-claude-bot commented 2026-07-18 20:25:27 +00:00 (Migrated from github.com)

Found live while e2e-testing heavy-duty/box#88 (thin templates): a box seed's cloud-init runcmd runs with no $HOME in the environment, and rig's installer — set -u — dies on the first $HOME expansion instead of installing.

box#88 works around it seed-side (HOME=/root on the install line, scar documented in the template), but the installer could be robust on its own: derive a fallback (: "${HOME:=$(getent passwd "$(id -u)" | cut -d: -f6)}" or plain HOME=/root when euid 0) before first use.

Not urgent — every current caller is either an interactive shell or box#88's already-pinned seed. Worth folding into whichever of #35/#36's install.sh successors touches that file next rather than a standalone PR.

🤖 Generated with Claude Code

Found live while e2e-testing heavy-duty/box#88 (thin templates): a box seed's cloud-init `runcmd` runs with no `$HOME` in the environment, and rig's installer — `set -u` — dies on the first `$HOME` expansion instead of installing. box#88 works around it seed-side (`HOME=/root` on the install line, scar documented in the template), but the installer could be robust on its own: derive a fallback (`: "${HOME:=$(getent passwd "$(id -u)" | cut -d: -f6)}"` or plain `HOME=/root` when euid 0) before first use. Not urgent — every current caller is either an interactive shell or box#88's already-pinned seed. Worth folding into whichever of #35/#36's install.sh successors touches that file next rather than a standalone PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: heavy-duty/rig#39
No description provided.