mirror of
https://github.com/m1ngsama/automa.git
synced 2026-03-25 18:23:49 +00:00
fix: export .env vars with set -a so envsubst can see them
source without set -a sets vars in current shell but does not export them. Child processes like envsubst cannot see unexported vars, causing all template substitutions to produce empty strings. Fix: set -a before source, set +a after — auto-exports every assigned var.
This commit is contained in:
parent
929c527ad0
commit
2ae28fb0a7
6 changed files with 6 additions and 6 deletions
|
|
@ -8,7 +8,7 @@ source "$SCRIPT_DIR/../../bin/lib/common.sh"
|
|||
|
||||
ENV_FILE="${INFRA_DIR:-.}/.env"
|
||||
[ -f "$ENV_FILE" ] || { log_error "No .env found at $ENV_FILE"; exit 1; }
|
||||
source "$ENV_FILE"
|
||||
set -a; source "$ENV_FILE"; set +a
|
||||
|
||||
require_env DOMAIN MAIL_HOST MAIL_USER
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ source "$SCRIPT_DIR/../../../bin/lib/common.sh"
|
|||
|
||||
ENV_FILE="${INFRA_DIR:-.}/.env"
|
||||
[ -f "$ENV_FILE" ] || { log_error "No .env found at $ENV_FILE"; exit 1; }
|
||||
source "$ENV_FILE"
|
||||
set -a; source "$ENV_FILE"; set +a
|
||||
|
||||
require_env FRP_SERVER_ADDR FRP_SERVER_PORT FRP_TOKEN
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ source "$SCRIPT_DIR/../../../bin/lib/common.sh"
|
|||
|
||||
ENV_FILE="${INFRA_DIR:-.}/.env"
|
||||
[ -f "$ENV_FILE" ] || { log_error "No .env found at $ENV_FILE"; exit 1; }
|
||||
source "$ENV_FILE"
|
||||
set -a; source "$ENV_FILE"; set +a
|
||||
|
||||
require_env FRP_TOKEN FRP_WEB_PASSWORD FRP_BIND_PORT
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ source "$SCRIPT_DIR/../../bin/lib/common.sh"
|
|||
|
||||
ENV_FILE="${INFRA_DIR:-.}/.env"
|
||||
[ -f "$ENV_FILE" ] || { log_error "No .env found at $ENV_FILE"; exit 1; }
|
||||
source "$ENV_FILE"
|
||||
set -a; source "$ENV_FILE"; set +a
|
||||
|
||||
require_env DOMAIN
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ source "$SCRIPT_DIR/../../../bin/lib/common.sh"
|
|||
|
||||
ENV_FILE="${INFRA_DIR:-.}/.env"
|
||||
[ -f "$ENV_FILE" ] || { log_error "No .env found at $ENV_FILE"; exit 1; }
|
||||
source "$ENV_FILE"
|
||||
set -a; source "$ENV_FILE"; set +a
|
||||
|
||||
require_env SS_SERVER SS_PORT SS_PASSWORD SS_METHOD
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ source "$SCRIPT_DIR/../../../bin/lib/common.sh"
|
|||
|
||||
ENV_FILE="${INFRA_DIR:-.}/.env"
|
||||
[ -f "$ENV_FILE" ] || { log_error "No .env found at $ENV_FILE"; exit 1; }
|
||||
source "$ENV_FILE"
|
||||
set -a; source "$ENV_FILE"; set +a
|
||||
|
||||
require_env SS_PORT SS_PASSWORD SS_METHOD
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue