mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user