Closed scop closed 2 years ago
Docker build failure/timeout appears unrelated.
I'm slightly uneasy about simplifications like these. Are you absolutely sure that this can't break user programs? I wonder if turning an unset to null can matter, for example.
I cannot think of a case that this could break.
There certainly is a difference between unset and null valued variables (for example [[ -v varname ]]
in bash), but I can't see how this simplification could be used to turn a null to an unset or the other way around -- as said, the expanded value (which is what this simplification is about, it's not changing the variable's value or definedness) is null either way for both unset and null valued variable expansions.
Alright, SGTM. We can always revert if our thinking here is wrong.
If the default for an unset-or-null parameter expansion is null, the or-null part of the expansion is redundant and can be removed. The result is null on match either way.