connect_to_testnet.nims: don't die when GNU getopts is missing
This commit is contained in:
parent
7aec3dfc4b
commit
8e648da399
|
@ -111,12 +111,6 @@ cli do (skipGoerliKey {.
|
||||||
echo "Detected testnet restart. Deleting previous database..."
|
echo "Detected testnet restart. Deleting previous database..."
|
||||||
rmDir dataDir
|
rmDir dataDir
|
||||||
|
|
||||||
cd rootDir
|
|
||||||
|
|
||||||
exec &"""./scripts/make_prometheus_config.sh --nodes 1 --base-metrics-port 8008 --config-file "{dataDir}/prometheus.yml""""
|
|
||||||
|
|
||||||
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
|
|
||||||
|
|
||||||
proc execIgnoringExitCode(s: string) =
|
proc execIgnoringExitCode(s: string) =
|
||||||
# reduces the error output when interrupting an external command with Ctrl+C
|
# reduces the error output when interrupting an external command with Ctrl+C
|
||||||
try:
|
try:
|
||||||
|
@ -124,6 +118,13 @@ cli do (skipGoerliKey {.
|
||||||
except OsError:
|
except OsError:
|
||||||
discard
|
discard
|
||||||
|
|
||||||
|
cd rootDir
|
||||||
|
|
||||||
|
# macOS may not have gnu-getopts installed and in the PATH
|
||||||
|
execIgnoringExitCode &"""./scripts/make_prometheus_config.sh --nodes 1 --base-metrics-port 8008 --config-file "{dataDir}/prometheus.yml""""
|
||||||
|
|
||||||
|
exec &"""nim c {nimFlags} -d:"const_preset={preset}" -o:"{beaconNodeBinary}" beacon_chain/beacon_node.nim"""
|
||||||
|
|
||||||
if not skipGoerliKey and depositContractOpt.len > 0 and not system.dirExists(validatorsDir):
|
if not skipGoerliKey and depositContractOpt.len > 0 and not system.dirExists(validatorsDir):
|
||||||
mode = Silent
|
mode = Silent
|
||||||
echo "\nPlease enter your Goerli Eth1 private key in hex form (e.g. 0x1a2...f3c) in order to become a validator (you'll need access to 32 GoETH)."
|
echo "\nPlease enter your Goerli Eth1 private key in hex form (e.g. 0x1a2...f3c) in order to become a validator (you'll need access to 32 GoETH)."
|
||||||
|
|
Loading…
Reference in New Issue