Files
vue-ts-example-2025/.husky/README.md
严浩 e94c5fc372
All checks were successful
CI/CD Pipeline / playwright (push) Successful in 4m16s
CI/CD Pipeline / build-and-deploy (push) Successful in 5m20s
docs(readme): 添加 vitesse 项目链接
2025-10-22 22:28:51 +08:00

21 lines
606 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
### Husky 遇到 command not found: husky
- https://typicode.github.io/husky/zh/troubleshoot.html#找不到命令-command-not-found
- https://typicode.github.io/husky/zh/how-to.html#node-版本管理器和-gui
```bash
ln -s $(which pnpm) $HOME/.local/bin/pnpm
```
```bash
if command -v pnpm >/dev/null 2>&1; then
# 如果 pnpm 可用,直接使用它
pnpm exec lint-staged
else
# 如果 pnpm 不可用,使用 $HOME/.local/bin/pnpm
# ln -s $(which pnpm) $HOME/.local/bin/pnpm
echo "找不到 pnpm使用 $HOME/.local/bin/pnpm"
"$HOME"/.local/bin/pnpm exec lint-staged
fi
```