浏览代码

Use gotestsum in Lefthook when possible

DarthSim 1 月之前
父节点
当前提交
bd548e00e8
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      .lefthook/pre-push/test

+ 5 - 1
.lefthook/pre-push/test

@@ -10,4 +10,8 @@ fi
 export CGO_LDFLAGS_ALLOW="-s|-w"
 export CGO_CFLAGS_ALLOW="-Xpreprocessor"
 
-go test ./...
+if [ -x "$(which gotestsum)" ]; then
+  gotestsum ./...
+else
+  go test -v ./...
+fi