diff --git a/install.sh b/install.sh index b1b83ab..2b10ed9 100755 --- a/install.sh +++ b/install.sh @@ -41,6 +41,9 @@ prompt_subscription_if_needed if [ -n "$(subscription_url 2>/dev/null || true)" ]; then if generate_config; then + if [ -n "${INSTALL_PENDING_SUBSCRIPTION_URL:-}" ]; then + write_env_value "CLASH_SUBSCRIPTION_URL" "$INSTALL_PENDING_SUBSCRIPTION_URL" + fi echo "✨ 订阅已生效" post_install_verify else diff --git a/scripts/core/config.sh b/scripts/core/config.sh index a8faa60..c9da7e2 100644 --- a/scripts/core/config.sh +++ b/scripts/core/config.sh @@ -2816,7 +2816,7 @@ prompt_subscription_if_needed() { fi input_fmt="$(detect_subscription_format "$input_url")" - write_env_value "CLASH_SUBSCRIPTION_URL" "$input_url" + INSTALL_PENDING_SUBSCRIPTION_URL="$input_url" bootstrap_subscription_from_install_input "$input_url" "$input_fmt" "default" }