fix: local keyword outside function in env.sh
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
d82d80cabb
commit
80811498e4
1 changed files with 2 additions and 2 deletions
|
|
@ -27,14 +27,14 @@ export DISINTO_LOG_DIR
|
||||||
# by the compose-injected value when running via docker exec.
|
# by the compose-injected value when running via docker exec.
|
||||||
if [ -f "$FACTORY_ROOT/.env.enc" ] && command -v sops &>/dev/null; then
|
if [ -f "$FACTORY_ROOT/.env.enc" ] && command -v sops &>/dev/null; then
|
||||||
set -a
|
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)" \
|
eval "$(sops -d --output-type dotenv "$FACTORY_ROOT/.env.enc" 2>/dev/null)" \
|
||||||
|| echo "Warning: failed to decrypt .env.enc — secrets not loaded" >&2
|
|| echo "Warning: failed to decrypt .env.enc — secrets not loaded" >&2
|
||||||
set +a
|
set +a
|
||||||
[ -n "$_saved_forge_url" ] && export FORGE_URL="$_saved_forge_url"
|
[ -n "$_saved_forge_url" ] && export FORGE_URL="$_saved_forge_url"
|
||||||
elif [ -f "$FACTORY_ROOT/.env" ]; then
|
elif [ -f "$FACTORY_ROOT/.env" ]; then
|
||||||
# Preserve compose-injected FORGE_URL (localhost in .env != forgejo in Docker)
|
# Preserve compose-injected FORGE_URL (localhost in .env != forgejo in Docker)
|
||||||
local _saved_forge_url="${FORGE_URL:-}"
|
_saved_forge_url="${FORGE_URL:-}"
|
||||||
set -a
|
set -a
|
||||||
# shellcheck source=/dev/null
|
# shellcheck source=/dev/null
|
||||||
source "$FACTORY_ROOT/.env"
|
source "$FACTORY_ROOT/.env"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue