Explicitly use python3 in githook validation
authorMagnus Hagander <magnus@hagander.net>
Sun, 24 Feb 2019 11:21:25 +0000 (12:21 +0100)
committerMagnus Hagander <magnus@hagander.net>
Sun, 10 Mar 2019 15:17:41 +0000 (08:17 -0700)
tools/githook/pre-commit

index 8d0a87d1585e071b559b714c9ef9668c4a38bd65..47cc50da8e0067246ecd32f8b2c9643b8d54a7e7 100755 (executable)
@@ -14,7 +14,7 @@ if [ "$FILES" != "" ]; then
     # each file.
     E=0
     for F in ${FILES}; do
-       P=$(git show ":$F" | python -c "import sys; compile(sys.stdin.read(), '/dev/null', 'exec')")
+       P=$(git show ":$F" | python3 -c "import sys; compile(sys.stdin.read(), '/dev/null', 'exec')")
        if [ "$?" != "0" ]; then
            echo "Errors in $F"
            echo $P