diff --git a/lefthook.yml b/lefthook.yml index 9b4be96056f..e66d56f6562 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -18,4 +18,13 @@ pre-commit: post-merge: commands: update-submodules: - run: pnpm update-submodules \ No newline at end of file + run: pnpm update-submodules + update-packages: + run: pnpm i + +post-checkout: + commands: + update-packages: + # cf https://git-scm.com/docs/githooks#_post_checkout: + # The 3rd argument is 1 for branch checkouts and 0 for file checkouts. + run: if test {3} -eq "1"; then pnpm i; fi