From 18a680482487197f47f2a7ffa0131993c302a102 Mon Sep 17 00:00:00 2001 From: Heat Hamilton <55773810+heatlikeheatwave@users.noreply.github.com> Date: Thu, 1 Feb 2024 13:13:27 -0500 Subject: [PATCH] website: fix husky command (#20405) Update husky pre-commit to work in website, a sub-directory of the directory containing the .git dir --- website/.husky/pre-commit | 4 +++- website/package-lock.json | 14 +++++++------- website/package.json | 4 ++-- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/website/.husky/pre-commit b/website/.husky/pre-commit index 9e1c644b65..ed0b6423e4 100644 --- a/website/.husky/pre-commit +++ b/website/.husky/pre-commit @@ -1 +1,3 @@ -next-hashicorp precommit \ No newline at end of file +cd website + +npx next-hashicorp precommit \ No newline at end of file diff --git a/website/package-lock.json b/website/package-lock.json index ae69a02bb8..5ce68d61c7 100644 --- a/website/package-lock.json +++ b/website/package-lock.json @@ -11,7 +11,7 @@ "@hashicorp/platform-cli": "^2.7.3", "@hashicorp/platform-content-conformance": "^0.0.12", "dart-linkcheck": "^2.0.15", - "husky": "^9.0.6", + "husky": "^9.0.7", "next": "^12.3.1", "prettier": "^3.2.4" }, @@ -6140,9 +6140,9 @@ } }, "node_modules/husky": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.6.tgz", - "integrity": "sha512-EEuw/rfTiMjOfuL7pGO/i9otg1u36TXxqjIA6D9qxVjd/UXoDOsLor/BSFf5hTK50shwzCU3aVVwdXDp/lp7RA==", + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.7.tgz", + "integrity": "sha512-vWdusw+y12DUEeoZqW1kplOFqk3tedGV8qlga8/SF6a3lOiWLqGZZQvfWvY0fQYdfiRi/u1DFNpudTSV9l1aCg==", "dev": true, "bin": { "husky": "bin.js" @@ -19272,9 +19272,9 @@ "peer": true }, "husky": { - "version": "9.0.6", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.6.tgz", - "integrity": "sha512-EEuw/rfTiMjOfuL7pGO/i9otg1u36TXxqjIA6D9qxVjd/UXoDOsLor/BSFf5hTK50shwzCU3aVVwdXDp/lp7RA==", + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.7.tgz", + "integrity": "sha512-vWdusw+y12DUEeoZqW1kplOFqk3tedGV8qlga8/SF6a3lOiWLqGZZQvfWvY0fQYdfiRi/u1DFNpudTSV9l1aCg==", "dev": true }, "iconv-lite": { diff --git a/website/package.json b/website/package.json index 75efa96755..125e74228c 100644 --- a/website/package.json +++ b/website/package.json @@ -7,7 +7,7 @@ "@hashicorp/platform-cli": "^2.7.3", "@hashicorp/platform-content-conformance": "^0.0.12", "dart-linkcheck": "^2.0.15", - "husky": "^9.0.6", + "husky": "^9.0.7", "next": "^12.3.1", "prettier": "^3.2.4" }, @@ -15,7 +15,7 @@ "scripts": { "build": "./scripts/website-build.sh", "format": "next-hashicorp format", - "prepare": "husky", + "prepare": "cd .. && husky website/.husky", "generate:component": "next-hashicorp generate component", "generate:readme": "next-hashicorp markdown-blocks README.md", "lint": "next-hashicorp lint",