Run git pull first in update.sh, not mid-script #48

Merged
haylan merged 1 commits from fix-update-sh-pull-order into main 2026-09-06 19:40:10 +00:00
1 Commits
Author SHA1 Message Date
haylan 7b6d3f5802 fix: run git pull first in update.sh, not mid-script
Real failure on the server after #47 merged: the old GID-resolution
code ran (found the old COMFYUI_VIDEO_GID/COMFYUI_RENDER_GID vars
"already set"), then git pull swapped every file on disk out from
under the still-running script — including docker-compose.yml, now
requiring HOST_VIDEO_GID/HOST_RENDER_GID — but the resolution step
that would populate those had already run under the old code and
never re-ran. compose validation then failed on the new required
vars that were never set.

A self-updating script isn't atomic against its own file changing
mid-run. Move git pull to the very first thing the script does, so
every run is consistently either fully old or fully new code, never
a mix.

bash -n and docker compose config -q both validated.
2026-09-06 21:38:18 +02:00