Something went wrong. Try again.
Monorepo for Aesthetic.Computer aesthetic.computer
Something went wrong. Try again.
Shell
1234567891011121314151617181920212223242526272829#!/usr/bin/env bash# with-env.sh# Load environment variables from vault and run a command# Usage: ./with-env.sh node create-account.mjs "auth0|12345"
VAULT_ENV="/workspaces/aesthetic-computer/aesthetic-computer-vault/at/.env"
if [ ! -f "$VAULT_ENV" ]; then echo "❌ Vault env file not found: $VAULT_ENV" exit 1fi
# Export all variables from the .env file (ignoring comments and empty lines)while IFS='=' read -r key value || [ -n "$key" ]; do # Skip comments and empty lines [[ "$key" =~ ^#.*$ ]] && continue [[ -z "$key" ]] && continue # Remove leading/trailing whitespace key=$(echo "$key" | xargs) value=$(echo "$value" | xargs) # Export the variable export "$key=$value"done < "$VAULT_ENV"
# Run the commandexec "$@"