RFR: 8315786: [AIX] Build Disk Local Detection Issue with GNU-utils df on AIX

Erik Joelsson erikj at openjdk.org
Tue Sep 12 16:54:42 UTC 2023


On Tue, 12 Sep 2023 15:58:44 GMT, Tyler Steele <tsteele at 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


More information about the build-dev mailing list