]> git.lizzy.rs Git - rust.git/blobdiff - src/etc/pre-push.sh
Rollup merge of #95214 - tbu-:pr_vec_append_doc, r=Mark-Simulacrum
[rust.git] / src / etc / pre-push.sh
index a78725f2ab0d1c1383e708240e819ae451c843c0..5f5b48bc1c0b43ff235a91779e173ac3d05e2090 100755 (executable)
@@ -1,6 +1,6 @@
 #!/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.
 #
@@ -14,6 +14,8 @@ COMMAND="$ROOT_DIR/x.py test tidy --bless"
 
 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'"