Skip to content

Commit

Permalink
fixed issue when passing debug options through the run_demo script
Browse files Browse the repository at this point in the history
Signed-off-by: pco <[email protected]>
  • Loading branch information
pasquale95 committed Oct 18, 2022
1 parent c66ee16 commit 2777d02
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions demo/run_demo
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ if [ -z "$DOCKER_NET" ]; then
fi
DOCKER_VOL=""

j=1
for i in "$@"
do
((j++))
if [ ! -z "$SKIP" ]; then
SKIP=""
continue
Expand Down Expand Up @@ -65,12 +67,12 @@ do
continue
;;
--debug-pycharm-controller-port)
PYDEVD_PYCHARM_CONTROLLER_PORT=$2
PYDEVD_PYCHARM_CONTROLLER_PORT=${!j}
SKIP=1
continue
;;
--debug-pycharm-agent-port)
PYDEVD_PYCHARM_AGENT_PORT=$2
PYDEVD_PYCHARM_AGENT_PORT=${!j}
SKIP=1
continue
;;
Expand Down Expand Up @@ -154,7 +156,7 @@ if [ ! -z "$DOCKERHOST" ]; then
export RUNMODE="docker"
elif [ -z "${PWD_HOST_FQDN}" ]; then
# getDockerHost; for details refer to https://github.com/bcgov/DITP-DevOps/tree/main/code/snippets#getdockerhost
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
. /dev/stdin <<<"$(cat <(curl -s --raw https://raw.githubusercontent.com/bcgov/DITP-DevOps/main/code/snippets/getDockerHost))"
export DOCKERHOST=$(getDockerHost)
export RUNMODE="docker"
else
Expand Down

0 comments on commit 2777d02

Please sign in to comment.