mirror of
https://github.com/wnlen/clash-for-linux.git
synced 2026-10-10 04:03:04 +08:00
fix: persist install subscription only after successful config generation
This commit is contained in:
@@ -41,6 +41,9 @@ prompt_subscription_if_needed
|
|||||||
|
|
||||||
if [ -n "$(subscription_url 2>/dev/null || true)" ]; then
|
if [ -n "$(subscription_url 2>/dev/null || true)" ]; then
|
||||||
if generate_config; then
|
if generate_config; then
|
||||||
|
if [ -n "${INSTALL_PENDING_SUBSCRIPTION_URL:-}" ]; then
|
||||||
|
write_env_value "CLASH_SUBSCRIPTION_URL" "$INSTALL_PENDING_SUBSCRIPTION_URL"
|
||||||
|
fi
|
||||||
echo "✨ 订阅已生效"
|
echo "✨ 订阅已生效"
|
||||||
post_install_verify
|
post_install_verify
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2816,7 +2816,7 @@ prompt_subscription_if_needed() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
input_fmt="$(detect_subscription_format "$input_url")"
|
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"
|
bootstrap_subscription_from_install_input "$input_url" "$input_fmt" "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user