fix: auto light-weight mode doesn't take effect in silent-start mode (#3875)

* fix: auto light-weight mode does not take effect when silent-start mode is enabled

* refactor: streamline window state retrieval and hiding logic

* fix: add checks for remote name and existence before format check in pre-push hook

* fix: simplify remote checks in pre-push hook to enhance clarity and maintainability

---------

Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com>
This commit is contained in:
希亚的西红柿
2025-06-23 23:13:31 +08:00
committed by GitHub
parent d5a174c71b
commit 6d519dac1e
5 changed files with 48 additions and 33 deletions

View File

@@ -8,11 +8,9 @@ if git diff --cached --name-only | grep -q '^src-tauri/'; then
fi
fi
remote_name="$1"
remote_url=$(git remote get-url "$remote_name")
if [[ "$remote_url" =~ github\.com[:/]+clash-verge-rev/clash-verge-rev(\.git)?$ ]]; then
echo "[pre-push] Detected push to clash-verge-rev/clash-verge-rev ($remote_url)"
# 检查所有 remote url 是否有目标仓库
if git remote -v | grep -Eq 'github\\.com[:/]+clash-verge-rev/clash-verge-rev(\\.git)?'; then
echo "[pre-push] Detected push to clash-verge-rev/clash-verge-rev"
echo "[pre-push] Running pnpm format:check..."
pnpm format:check