diff --git a/dev/linter.sh b/dev/linter.sh index 47779095..2ad74fa9 100755 --- a/dev/linter.sh +++ b/dev/linter.sh @@ -10,7 +10,10 @@ { V=$(black --version|cut '-d ' -f3) code='import distutils.version; assert "19.3" < distutils.version.LooseVersion("'$V'")' - python -c "${code}" 2> /dev/null + PYTHON=false + command -v python > /dev/null && PYTHON=python + command -v python3 > /dev/null && PYTHON=python3 + ${PYTHON} -c "${code}" 2> /dev/null } || { echo "Linter requires black 19.3b0 or higher!" exit 1