Skip to content

Commit 34248bd

Browse files
artemis-ccmaciejnems
authored andcommitted
Perform word splitting on custom arguments (#560)
Custom arguments set via the Docker environment file are passed to the entrypoint script as a single string (rather than anything more structured like an array). Use xargs to split this string into shell words, enabling the passing of custom arguments which individually contain whitespace (such as `--telemetry-url 'wss://telemetry.polkadot.io/submit/ 1'`). Fixes Cardinal-Cryptography/aleph-node-runner#14.
1 parent 7131192 commit 34248bd

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

docker/docker_entrypoint.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,4 @@ if [[ -n "${UNIT_CREATION_DELAY:-}" ]]; then
110110
ARGS+=(--unit-creation-delay="${UNIT_CREATION_DELAY}")
111111
fi
112112

113-
if [[ -n "${CUSTOM_ARGS:-}" ]]; then
114-
ARGS+=(${CUSTOM_ARGS})
115-
fi
116-
117-
aleph-node "${ARGS[@]}"
113+
echo "${CUSTOM_ARGS}" | xargs aleph-node "${ARGS[@]}"

0 commit comments

Comments
 (0)