Skip to content

Commit 22bba41

Browse files
authored
Merge pull request #68 from blinklabs-io/fix/entrypoint-network
fix: entrypoint NETWORK variable for cli
2 parents 38fd4f9 + 1322f06 commit 22bba41

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

bin/entrypoint

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
set -e
44

5+
if [[ -n ${NETWORK} ]]; then
6+
if [[ ${1} == cli ]]; then
7+
exec /usr/local/bin/run-client ${@}
8+
else
9+
exec /usr/local/bin/run-network ${@}
10+
fi
11+
fi
12+
513
case ${1} in
614
run) exec /usr/local/bin/run-node ${@} ;;
715
cli) exec /usr/local/bin/run-client ${@} ;;
16+
*) echo "Nothing to do! Perhaps try [run|cli], or set NETWORK environment variable."; exit 1 ;;
817
esac
9-
if [[ -n ${NETWORK} ]]; then
10-
exec /usr/local/bin/run-network ${@}
11-
fi
12-
13-
echo "Nothing to do! Perhaps try [run|cli], or set NETWORK environment variable."
14-
exit 1

0 commit comments

Comments
 (0)