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
boot.sh: Correct use of "Alternate Value" expansion
Using `${var:+alt}` expands to the alternative value for variables which set
_and_ non-empty, while `${var+alt}` expands to the alternative value for
variables which are set, even if they are empty.
$ ( foo="abc" ; bar="" ; echo "FOO: \"${foo+set}\" \"${foo:+set}\""; echo "BAR: \"${bar+set}\" \"${bar:+set}\""; echo "BAZ: \"${baz+set}\" \"${baz:+set}\"" )
FOO: "set" "set"
BAR: "set" ""
BAZ: "" ""
The `${var:+alt}` semantics is what is needed here, it only really matters if
the variable (`${kubeadm_data}` in this case) is ever set to `""`, which it
never is here, but correct it anyway to avoid a potential future pitfall.
Signed-off-by: Ian Campbell <ijc@docker.com>
0 commit comments