Files
vue-ts-example/.husky/pre-commit
严浩 f5a328d79f
All checks were successful
CI / cache-and-install (push) Successful in 1m23s
Husky 遇到 command not found: husky
2024-08-22 11:26:54 +08:00

9 lines
256 B
Plaintext

echo "Running pre-commit hook..."
if command -v pnpm >/dev/null 2>&1; then
# 如果 pnpm 可用,直接使用它
pnpm exec lint-staged
else
# 如果 pnpm 不可用,使用 $HOME/.local/bin/pnpm
"$HOME"/.local/bin/pnpm exec lint-staged
fi