Skip to content

Commit 86e563a

Browse files
authored
reth-entrypoint: use safe parameter expansion to prevent set -u unbound variable errors (#529)
1 parent 9124a5c commit 86e563a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

reth/reth-entrypoint

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ P2P_PORT="${P2P_PORT:-30303}"
1212
ADDITIONAL_ARGS=""
1313
NODE_TYPE="${NODE_TYPE:-vanilla}"
1414

15-
if [[ -z "$RETH_CHAIN" ]]; then
15+
if [[ -z "${RETH_CHAIN:-}" ]]; then
1616
echo "expected RETH_CHAIN to be set" 1>&2
1717
exit 1
1818
fi
1919

2020
# Add Flashblocks support for base mode
21-
if [[ "$NODE_TYPE" == "base" && -n "$RETH_FB_WEBSOCKET_URL" ]]; then
21+
if [[ "$NODE_TYPE" == "base" && -n "${RETH_FB_WEBSOCKET_URL:-}" ]]; then
2222
ADDITIONAL_ARGS="--websocket-url=$RETH_FB_WEBSOCKET_URL"
2323
echo "Enabling Flashblocks support with endpoint: $RETH_FB_WEBSOCKET_URL"
2424
fi

0 commit comments

Comments
 (0)