From f2dcc1f705b16d43b34a3f5d9b7dce302a2d576c Mon Sep 17 00:00:00 2001 From: Chi-Hsuan Huang Date: Wed, 30 Mar 2022 16:32:38 +0800 Subject: [PATCH] Add git:update-hooks to postinstall --- package.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 3f7f9789ea7..4b93a796730 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,9 @@ "url": "https://github.com/woocommerce/woocommerce/issues" }, "scripts": { - "preinstall": "npx only-allow pnpm" + "preinstall": "npx only-allow pnpm", + "postinstall": "pnpm git:update-hooks", + "git:update-hooks": "rm -r .git/hooks && mkdir -p .git/hooks && husky install" }, "devDependencies": { "@automattic/nx-composer": "^0.1.0",