You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workaround; As indicated, to put the variable in quotation marks, as in command: /app/script.sh "${BAR:?BAR variable missing}". Then it works, as expected.
I am unsure about #848, as you can see it also seems to treat foo and bar differently when set, so this may be a related issue. Note how BAR is never read, although it is certainly being set.
The text was updated successfully, but these errors were encountered:
Describe the bug
The required variable syntax (
${BAR:?BAR variable missing}
) is not resolved when not in quotation marks since v1.1.0.To Reproduce
Here is an full example/MWE:
https://gist.github.com/rugk/ac09b28bc9de833e772cb1509364b421 (You can just git clone the gist.)
The relevant part is:
script.sh
:(copied/adjusted from #848, which may or may not be related)
BAR
can be there or not, in any case it is not handled at all.Expected behavior
AFAIK this has worked in versions before:
BAR
is not set, show an errorBAR variable missing
BAR
is set, expand it with it's valueAFAIK this is the correct syntax/usage for required variables.
Actual behavior
It is not expanded, and just passed/treated as is.
In
podman-compose-test
:Output
Environment:
Additional context
Workaround; As indicated, to put the variable in quotation marks, as in
command: /app/script.sh "${BAR:?BAR variable missing}"
. Then it works, as expected.I am unsure about #848, as you can see it also seems to treat foo and bar differently when set, so this may be a related issue. Note how
BAR
is never read, although it is certainly being set.The text was updated successfully, but these errors were encountered: