mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 02:48:38 -04:00
debian-live hook: set safe.directory before the pre-stamp reset
Add `git config --global --add safe.directory /opt/wrolpi` before the `git reset --hard`, guarding against git's "dubious ownership" refusal. Set HOME=/root first so the --global write cannot fail (and abort the ISO build under `set -e`) if the live-build chroot leaves HOME unset -- the same pattern the pi-gen hook already uses. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
575d2f9744
commit
a3a712ead1
1 changed files with 5 additions and 2 deletions
|
|
@ -62,8 +62,11 @@ npm install
|
|||
# against the dirty lock can never match on first boot and the box rebuilds the app.
|
||||
# Reset to HEAD here, exactly as repair.sh does, so the baked stamp represents
|
||||
# committed source. Only the lock is reverted; build/, node_modules, and the venvs
|
||||
# are untracked and survive. The repo is cloned and reset as root (same owner),
|
||||
# so no safe.directory config is needed here.
|
||||
# are untracked and survive. HOME is set explicitly so `git config --global`
|
||||
# cannot fail (and abort the build under `set -e`) when the chroot leaves HOME
|
||||
# unset; safe.directory avoids git's "dubious ownership" refusal.
|
||||
export HOME=/root
|
||||
git config --global --add safe.directory /opt/wrolpi
|
||||
git -C /opt/wrolpi reset --hard HEAD
|
||||
|
||||
# Build the React production bundle. Without this, /opt/wrolpi/app/build/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue