#!/usr/bin/env bash
#
-# Call `tidy --bless` before each commit
+# Call `tidy --bless` before git push
# Copy this script to .git/hooks to activate,
# and remove it from .git/hooks to deactivate.
#
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
COMMAND="python $COMMAND"
+elif ! command -v python &> /dev/null; then
+ COMMAND="python3 $COMMAND"
fi
echo "Running pre-push script '$COMMAND'"