From a993d8cd2677cfc1544b9c514ff99b4d3af2e694 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 27 Mar 2025 14:05:10 -0400 Subject: [PATCH] Streamline the linker hook messages --- .githooks/post-commit | 4 ++-- .githooks/pre-commit | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.githooks/post-commit b/.githooks/post-commit index 461200a2..96e19a17 100755 --- a/.githooks/post-commit +++ b/.githooks/post-commit @@ -6,6 +6,6 @@ if test -f "$FILE"; then mv .links.disabled.yaml .links.yaml # echo "running yarn" yarnLog=$(yarn) - echo "The post-commit hook enabled the links again: moved .links.disabled.yaml to .links.yaml and ran yarn." + echo "[yarn-linker] The post-commit hook has re-enabled .links.yaml." exit 1 -fi \ No newline at end of file +fi diff --git a/.githooks/pre-commit b/.githooks/pre-commit index d92625c2..f8098203 100755 --- a/.githooks/pre-commit +++ b/.githooks/pre-commit @@ -7,6 +7,6 @@ if test -f "$FILE"; then # echo "running yarn" x=$(yarn) y=$(git add yarn.lock) - echo "YARN-LINKER-HOOK: We do not allow to commit with local links in the yarn.lock file. The pre-commit hook MODIFIED the yarn.lock file with disabled .links.yaml. Check the new git status (the hook added yarn.lock, was this desired?). The post-commit hook enables the links again. It moves .links.disabled.yaml to .links.yaml and runs yarn. If you are okay with the changes to the staged files, run \`git commit\` again!" + echo "[yarn-linker] The pre-commit hook has disabled .links.yaml and MODIFIED the yarn.lock file. Review the staged changes (the hook added yarn.lock, was this desired?) and run \`git commit \` again if they look okay. The post-commit hook will re-enable your links." exit 1 fi