Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
git-hook-template: minor output formatting
Adrian Duke committed 13 days ago
commit 1df1acabfae9182174e918fa8191fda5f32c053b
parent 4e0f739
1 file changed +2 -4
modified scripts/git-hook-template.sh
@@ -28,7 +28,7 @@ if [ ${#CHANGED_FILES[@]} -gt 0 ]; then
    # Read from /dev/tty because stdin is not attached to the terminal in Git hooks.
    exec < /dev/tty

-
    read -r -p "Do you want to continue executing the ${HOOK_NAME} hooks? [y/N] " response
+
    read -r -p "⚠️ Do you want to continue executing the '${HOOK_NAME}' hook? [y/N] " response
    case "$response" in
        [yY][eE][sS]|[yY])
            echo "Continuing with '${HOOK_NAME}' hook..."
@@ -42,14 +42,12 @@ fi

# Execute the appropriate just recipe based on the hook name
if [ "$HOOK_NAME" = "pre-commit" ]; then
-
    echo "Running pre-commit checks..."
    just pre-commit
elif [ "$HOOK_NAME" = "pre-push" ]; then
-
    echo "Running pre-push checks..."
    just pre-push
elif [ "$HOOK_NAME" = "post-checkout" ]; then
    just post-checkout
else
-
    echo "Unknown hook: $HOOK_NAME"
+
    echo "⚠️ Unknown hook: $HOOK_NAME"
    exit 1
fi