On Tue, 12 Sep 2023 15:58:44 GMT, Tyler Steele <tste...@openjdk.org> wrote:

> I recall there were some issues (I believe in some older versions of bash) 
> when an empty shell variable was expanded in a if statement. I no longer 
> remember the details, but it has become my habit to always quote shell 
> variable [expansions].

That does depend on the context. In this case the whole command line is quoted, 
which is definitely something different and the cause for the problem. I agree 
that variable references in conditionals should be quoted, e.g.


if [ "$foo" = "$bar" ]; then

or

if test "$foo" = "$bar"; then


But in this case we aren't using `[]` or `test`, we are running a command 
directly.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/15592#issuecomment-1716095847

Reply via email to