Skip to content

Commit

Permalink
fix(compile): switch to expr to check regex for compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
zyv committed Aug 28, 2023
1 parent 85b6cb2 commit d4485d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/compile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ fi
# 3.8.1 -> valid
# ==3.8.1 -> valid

if [[ "$PYTHON_RUNTIME_VERSION" =~ ^(==)?[2-9](\.[0-9]+){2}$ ]] ; then
if expr "${PYTHON_RUNTIME_VERSION#"=="}" : "^[2-9]\.[0-9]\{1,\}\.[0-9]\{1,\}$" > /dev/null ; then
PYTHON_RUNTIME_VERSION=${PYTHON_RUNTIME_VERSION#"=="}
log "Write $PYTHON_RUNTIME_VERSION into $RUNTIME_FILE"
echo "python-$PYTHON_RUNTIME_VERSION" > "$RUNTIME_FILE"
Expand Down

0 comments on commit d4485d7

Please sign in to comment.