fix: cd /tmp before uv run to avoid /root/uv.toml permission error

sudo -u infra_service inherits the working dir (/root), causing uv to
fail reading /root/uv.toml. Running from /tmp avoids the permission issue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Deeman
2026-02-27 17:24:47 +01:00
parent 012aa13f3e
commit 0d65ed73f7

View File

@@ -152,8 +152,8 @@ recover_project() {
fi fi
log "Recovering: ${containers[*]}" log "Recovering: ${containers[*]}"
sudo -u "${SERVICE_USER}" \ (cd /tmp && sudo -u "${SERVICE_USER}" \
"${UV}" run /tmp/server-infra-autocompose.py "${containers[@]}" > "${outfile}" "${UV}" run /tmp/server-infra-autocompose.py "${containers[@]}") > "${outfile}"
log " Saved to ${outfile}" log " Saved to ${outfile}"
} }