Skip to content

Commit ec39dc0

Browse files
Merge pull request #4 from Heratiki/main
Refactor Python version check.
2 parents fa9e7fc + bc9cf67 commit ec39dc0

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

install.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ check_requirements() {
5555
fi
5656

5757
# Check Python version
58-
PYTHON_VERSION=$($PYTHON_CMD -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
59-
if [[ $(echo "$PYTHON_VERSION 3.7" | awk '{print ($1 >= $2)}') == 0 ]]; then
58+
if ! $PYTHON_CMD -c "import sys; exit(0 if sys.version_info >= (3, 7) else 1)"; then
6059
print_error "Python 3.7+ is required. Found: $PYTHON_VERSION"
6160
exit 1
6261
fi

0 commit comments

Comments
 (0)