From 37b3f8d577b0ad7cee7f75862643b21849b40b52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C8=98tefan=20Talpalaru?= Date: Wed, 14 Apr 2021 14:46:09 +0200 Subject: [PATCH] run-beacon-node.sh: handle "--web3-url=..." properly Now the script looks at those command line arguments meant for nimbus_beacon_node to decide whether to prompt the user for a WEB3 URL or not. --- scripts/run-beacon-node.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/scripts/run-beacon-node.sh b/scripts/run-beacon-node.sh index e120733cc..95e9bd16d 100755 --- a/scripts/run-beacon-node.sh +++ b/scripts/run-beacon-node.sh @@ -58,7 +58,15 @@ MISSING_BINARY_HELP exit 1 fi -if [[ "$WEB3_URL" == "" ]]; then +WEB3_URL_OPT_PRESENT=0 +for op in "$@"; do + if [[ "${op}" =~ ^--web3-url=.*$ ]]; then + WEB3_URL_OPT_PRESENT=1 + break + fi +done + +if [[ "${WEB3_URL}" == "" && "${WEB3_URL_OPT_PRESENT}" == "0" ]]; then cat <