From 2df2237d5679ef566f3581d27f9b57639f2b93ad Mon Sep 17 00:00:00 2001 From: SpecialX <47072643+wangxiner55@users.noreply.github.com> Date: Wed, 8 Jul 2026 13:10:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A7=BB=E9=99=A4=20pre-push=20hook?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit husky 9 的 pre-push hook 在 Windows Git Bash 下有 stdout 'Bad file descriptor' bug, 阻塞所有推送。Go 编译检查改由 CI 完成。 规范文档 docs/standards/git-workflow.md §3.4 保留 pre-push 设计说明, 待 husky 修复或迁移至 CI 后恢复。 --- .husky/pre-push | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 .husky/pre-push diff --git a/.husky/pre-push b/.husky/pre-push deleted file mode 100644 index feb32c3..0000000 --- a/.husky/pre-push +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env sh -# pre-push hook:推送前编译检查 -# Go 服务编译检查(go 不在 PATH 时跳过,CI 会做完整检查) - -if ! command -v go >/dev/null 2>&1; then - echo "[pre-push] SKIP: go not in PATH, CI will verify" - exit 0 -fi - -for d in services/api-gateway services/push-gateway; do - if [ -d "$d" ]; then - (cd "$d" && go build ./... ) || { - echo "[pre-push] FAIL: $d go build failed" - exit 1 - } - fi -done - -echo "[pre-push] OK: Go build check passed"