fix: add USER=agent to crontab env (unbound variable in cron)
Some checks are pending
ci/woodpecker/push/ci Pipeline is pending
ci/woodpecker/push/smoke-init Pipeline is pending

env.sh references $USER which is not set in cron environment.
With set -u (pipefail), this causes env.sh to exit before setting
DISINTO_LOG_DIR, resulting in log writes to the read-only mount.

Root cause of silent cron failures since containerized setup.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
johba 2026-03-28 11:50:57 +00:00
parent afeb50fc18
commit 8f389d9dab

View file

@ -18,7 +18,8 @@ log() {
# Build crontab from project TOMLs and install for the agent user.
install_project_crons() {
local cron_lines="DISINTO_CONTAINER=1"
local cron_lines="DISINTO_CONTAINER=1
USER=agent"
for toml in "${DISINTO_DIR}"/projects/*.toml; do
[ -f "$toml" ] || continue
local pname