STR
Define some variables containing spaces, e.g.
with:
variables: FOO="bar baz",OTHER=…
Expected results
Variables applied like --var FOO="bar baz" --var OTHER=…
Actual results
Deploy fails with error like so (redacted irrelevant parts):
running: <preview-name> … --var FOO="bar --var baz" --var OTHER=…
i Using <ns> @ <domain> as context
x Invalid variable value 'baz"': must follow KEY=VALUE format
Observations
This appears to happen because the variables are incorrectly split:
variable_params= --var FOO=bar
variable_params= --var baz
variable_params= --var OTHER=…
I believe the culprit area is where the variables are split up into the separate --var KEY=VALUE args, here:
|
variable_params="" |
|
if [ ! -z "${variables}" ]; then |
|
for ARG in $(echo "${variables}" | tr ',' '\n'); do |
|
variable_params="${variable_params} --var ${ARG}" |
|
done |
|
|
|
params="${params} $variable_params" |
|
fi |
Also tried with single quotes instead, same err.
STR
Define some variables containing spaces, e.g.
Expected results
Variables applied like
--var FOO="bar baz" --var OTHER=…Actual results
Deploy fails with error like so (redacted irrelevant parts):
Observations
This appears to happen because the variables are incorrectly split:
I believe the culprit area is where the variables are split up into the separate
--var KEY=VALUEargs, here:deploy-preview/entrypoint.sh
Lines 46 to 53 in 7f3be3b
Also tried with single quotes instead, same err.