fix: fix: FORGE_TOKEN_OVERRIDE in entrypoint-llama.sh is overwritten by env.sh sourcing .env (#375)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/pr/smoke-init Pipeline was successful

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Claude 2026-04-07 18:34:45 +00:00
parent e8b77b1055
commit 7db129aba2
2 changed files with 8 additions and 0 deletions

View file

@ -48,6 +48,7 @@ while true; do
su -s /bin/bash agent -c "
export FORGE_TOKEN='${FORGE_TOKEN}'
export FORGE_TOKEN_OVERRIDE='${FORGE_TOKEN_OVERRIDE:-}'
export ANTHROPIC_API_KEY='${ANTHROPIC_API_KEY:-}'
export ANTHROPIC_BASE_URL='${ANTHROPIC_BASE_URL:-}'
export CLAUDE_CONFIG_DIR='${CLAUDE_CONFIG_DIR:-}'

View file

@ -64,6 +64,13 @@ elif [ -f "$FACTORY_ROOT/.env" ]; then
[ -n "$_saved_forge_url" ] && export FORGE_URL="$_saved_forge_url"
fi
# Allow per-container token override (#375): .env sets the default FORGE_TOKEN
# (dev-bot), then FORGE_TOKEN_OVERRIDE replaces it for containers that need a
# different Forgejo identity (e.g. dev-qwen).
if [ -n "${FORGE_TOKEN_OVERRIDE:-}" ]; then
export FORGE_TOKEN="$FORGE_TOKEN_OVERRIDE"
fi
# PATH: foundry, node, system
export PATH="${HOME}/.local/bin:${HOME}/.foundry/bin:${HOME}/.nvm/versions/node/v22.20.0/bin:/usr/local/bin:/usr/bin:/bin:${PATH}"
export HOME="${HOME:-/home/debian}"