From 3e56c2f10d7891e069069d42e0f46bfe048e2215 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Mon, 18 Mar 2024 21:15:53 +0100 Subject: [PATCH] fix: update husky precommit hook to run init script if present --- .husky/pre-commit | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 39634d7af6..68f98efcd9 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,8 +1,11 @@ -yarn lint-staged +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx lint-staged node .husky/update-openapi-spec-list.js # Check if the src/lib/openapi/spec/index.ts file was modified and if so, add it to the commit if git ls-files -m | grep -q "src/lib/openapi/spec/index.ts"; then git add src/lib/openapi/spec/index.ts -fi \ No newline at end of file +fi