fix: local keyword outside function in env.sh
Some checks failed
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/smoke-init Pipeline failed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
johba 2026-03-28 13:59:07 +00:00
parent d82d80cabb
commit 80811498e4

View file

@ -27,14 +27,14 @@ export DISINTO_LOG_DIR
# by the compose-injected value when running via docker exec.
if [ -f "$FACTORY_ROOT/.env.enc" ] && command -v sops &>/dev/null; then
set -a
local _saved_forge_url="${FORGE_URL:-}"
_saved_forge_url="${FORGE_URL:-}"
eval "$(sops -d --output-type dotenv "$FACTORY_ROOT/.env.enc" 2>/dev/null)" \
|| echo "Warning: failed to decrypt .env.enc — secrets not loaded" >&2
set +a
[ -n "$_saved_forge_url" ] && export FORGE_URL="$_saved_forge_url"
elif [ -f "$FACTORY_ROOT/.env" ]; then
# Preserve compose-injected FORGE_URL (localhost in .env != forgejo in Docker)
local _saved_forge_url="${FORGE_URL:-}"
_saved_forge_url="${FORGE_URL:-}"
set -a
# shellcheck source=/dev/null
source "$FACTORY_ROOT/.env"