This is an automated email from the ASF dual-hosted git repository.
bamaer pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/hop.git
The following commit(s) were added to refs/heads/main by this push:
new 7f183efee5 Issue #8299 : Word-split HOP_CONFIG_OPTIONS when invoking
hop-conf (#8312)
7f183efee5 is described below
commit 7f183efee5571119acdebd241a7620aec363e8dc
Author: Matt Casters <[email protected]>
AuthorDate: Sun Sep 13 08:55:32 2026 +0200
Issue #8299 : Word-split HOP_CONFIG_OPTIONS when invoking hop-conf (#8312)
* Issue #8299 : Word-split HOP_CONFIG_OPTIONS when invoking hop-conf
Quoted expansion passed the entire env var to hop-conf.sh as one argument,
so multiple options from Docker Compose were rejected as unmatched. Convert
the string to an array (env vars cannot carry bash arrays) and expand it
like HOP_EXEC_OPTIONS.
* Issue #8299 : Address review feedback on quote-aware split for
HOP_CONFIG_OPTIONS
Honour quotes when splitting HOP_CONFIG_OPTIONS so values containing spaces
(such as --describe-variable=FOO="An example variable") remain a single
argument, and remove the SC2206 shellcheck suppression. Also document
quoting
in docker-container.adoc.
---
docker/resources/load-and-execute.sh | 5 ++++-
docs/hop-user-manual/modules/ROOT/pages/docker-container.adoc | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/docker/resources/load-and-execute.sh
b/docker/resources/load-and-execute.sh
index 91fc3e23a8..b579b3e5b7 100755
--- a/docker/resources/load-and-execute.sh
+++ b/docker/resources/load-and-execute.sh
@@ -305,8 +305,11 @@ if [ -n "${HOP_CONFIG_OPTIONS}" ]; then
# We have a hop-config to run with the given options
#
echo "Configuring Hop with : ${HOP_CONFIG_OPTIONS}"
+ # Docker env vars cannot carry a bash array; split like a shell would,
+ # honouring quotes so option values may contain spaces.
+ mapfile -t HOP_CONFIG_OPTION_ARRAY < <(xargs -n1 printf '%s\n' <<<
"${HOP_CONFIG_OPTIONS}")
"${DEPLOYMENT_PATH}"/hop-conf.sh \
- "${HOP_CONFIG_OPTIONS}" \
+ "${HOP_CONFIG_OPTION_ARRAY[@]}" \
2>&1 | tee ${HOP_LOG_PATH}
fi
diff --git a/docs/hop-user-manual/modules/ROOT/pages/docker-container.adoc
b/docs/hop-user-manual/modules/ROOT/pages/docker-container.adoc
index 7a02f4f362..a9d5bca828 100644
--- a/docs/hop-user-manual/modules/ROOT/pages/docker-container.adoc
+++ b/docs/hop-user-manual/modules/ROOT/pages/docker-container.adoc
@@ -171,6 +171,7 @@ You can specify the properties as a comma separated list,
e.g. `PROP1=xxx,PROP2=
|
|If you specify a value for this variable, they will be used to execute
`hop-conf.sh` right before execution of the short- or long-lived container.
You can use it for example to configure values for keys, plugins, and so on.
+Specify multiple options separated by spaces. Enclose values containing spaces
in quotes, for example `--set-variable=FOO=bar --describe-variable=FOO="An
example variable"`.
|```HOP_COMMAND```
|