Streamline the linker hook messages

This commit is contained in:
Robin
2025-03-27 14:05:10 -04:00
parent 6a5b79143e
commit a993d8cd26
2 changed files with 3 additions and 3 deletions

View File

@@ -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
fi

View File

@@ -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