From 4f2a9906c40fa031887f47afb26bee8f483e98f5 Mon Sep 17 00:00:00 2001 From: Gyeongjae Choi Date: Sat, 28 Aug 2021 16:03:24 +0900 Subject: [PATCH] Fix run_docker to not ignore PYODIDE_SYSTEM_PORT (#1807) --- run_docker | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/run_docker b/run_docker index e62015138..fe96cce80 100755 --- a/run_docker +++ b/run_docker @@ -73,8 +73,9 @@ do fi if [[ -n ${PYODIDE_SYSTEM_PORT} ]]; then echo "WARNING: will use the env var PYODIDE_SYSTEM_PORT=${PYODIDE_SYSTEM_PORT} instead of the provided port" + else + PYODIDE_SYSTEM_PORT=$2 fi - DEFAULT_PYODIDE_SYSTEM_PORT=$2 shift 2 ;; --non-interactive) @@ -101,12 +102,12 @@ PYODIDE_SYSTEM_PORT=${PYODIDE_SYSTEM_PORT:-${DEFAULT_PYODIDE_SYSTEM_PORT}} PYODIDE_DOCKER_IMAGE=${PYODIDE_DOCKER_IMAGE:-${DEFAULT_PYODIDE_DOCKER_IMAGE}} # in case the port is not a number, do not bind the port -case $DEFAULT_PYODIDE_SYSTEM_PORT in +case $PYODIDE_SYSTEM_PORT in none) PORT_CONFIGURATION_LINE="" ;; ''|*[!0-9]*) # contains a non-digit character, therefore it is not a number - echo "WARNING: Invalid port argument '$DEFAULT_PYODIDE_SYSTEM_PORT'. Port binding disabled." + echo "WARNING: Invalid port argument '$PYODIDE_SYSTEM_PORT'. Port binding disabled." PORT_CONFIGURATION_LINE="" ;; *)