LoginSignup
0
0

More than 3 years have passed since last update.

huskyのpre-commitが動かない→バージョンを下げるとうまくいった

Posted at

タイトルがすべてです。version 5.xで動かなかったのでversion 4.3.8まで落としたらうまくいきました。

参考にしたサイト

pre-commitが動いてないのが丸わかりだったので、このサイトを参考に
ls .git/hooks
を実行すると*.sampleしか見えなかったんですね。
なので、何度か再インストールしてみたのですが、駄目。

結局4.3.8まで落とせばうまくいきました。うまくいったときのディレクトリはこんな感じ

shell
$ ls .git/hooks/
applypatch-msg*     husky.sh            post-commit*        post-update*        pre-commit*         pre-rebase*         sendemail-validate*
commit-msg*         post-applypatch*    post-merge*         pre-applypatch*     pre-merge-commit*   prepare-commit-msg*
husky.local.sh      post-checkout*      post-rewrite*       pre-auto-gc*        pre-push*           push-to-checkout*

ver.5で実行速度が上がったりdependenciesが減ったり、まずファイルサイズが小さくなってるようなのですが、それより実行できるかどうかを選ばせてください……

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0