Skip to content

Commit

Permalink
Perform word splitting on custom arguments (#560)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
artemis-cc authored and maciejnems committed Aug 1, 2022
1 parent 7131192 commit 34248bd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions docker/docker_entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,4 @@ if [[ -n "${UNIT_CREATION_DELAY:-}" ]]; then
ARGS+=(--unit-creation-delay="${UNIT_CREATION_DELAY}")
fi

if [[ -n "${CUSTOM_ARGS:-}" ]]; then
ARGS+=(${CUSTOM_ARGS})
fi

aleph-node "${ARGS[@]}"
echo "${CUSTOM_ARGS}" | xargs aleph-node "${ARGS[@]}"

0 comments on commit 34248bd

Please sign in to comment.