diff --git a/package.json b/package.json index c843d075711..adc3b6a8c85 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "clean": "pnpm store prune && git clean -fx **/node_modules && pnpm i", "preinstall": "npx only-allow pnpm", "postinstall": "pnpm git:update-hooks", - "git:update-hooks": "if test -d .git; then rm -r .git/hooks && mkdir -p .git/hooks && husky install; else husky install; fi", + "git:update-hooks": "if test -d .git; then rm -rf .git/hooks && mkdir -p .git/hooks && husky install; else husky install; fi", "create-extension": "node ./tools/create-extension/index.js", "sync-dependencies": "pnpm exec syncpack -- fix-mismatches", "utils": "node ./tools/monorepo-utils/dist/index.js" diff --git a/plugins/woocommerce/changelog/fix-pnpm-install-git-hooks b/plugins/woocommerce/changelog/fix-pnpm-install-git-hooks new file mode 100644 index 00000000000..66a52690a3c --- /dev/null +++ b/plugins/woocommerce/changelog/fix-pnpm-install-git-hooks @@ -0,0 +1,4 @@ +Significance: patch +Type: dev + +Fix "rm: .git/hooks: No such file or directory" error in `pnpm install`.