On Tue, 28 Apr 2026 21:30:51 GMT, Alexey Semenyuk <[email protected]> wrote:
>> test/jdk/tools/jpackage/junit/share/jdk.jpackage/jdk/jpackage/internal/cli/MainTest.java
>> line 200:
>>
>>> 198:
>>> I18N.format("error.parameter-not-empty-directory", invalidTempValue,
>>> "--temp")),
>>> 199: // Silent failure.
>>> 200: build().args("--verbose", "", "--temp",
>>> invalidTempValue).expectErrorExitCode(),
>>
>> Confused about these two test cases. I tried both manually via command line
>> and I am getting error printed that `--temp` directory not empty. Why
>> "Silent failure" does not cover it?
>
>> mkdir foo/bar
>
>> ./jdk-27/bin/jpackage --verbose --temp foo
> Error: The value "foo" provided for parameter --temp is not an empty
> directory or non existent path
>> echo $?
> 1
>
>> ./jdk-27/bin/jpackage --verbose "" --temp foo
>> echo $?
> 1
>
>
> `--verbose` and `--verbose ""` are interpreted differently. The first one
> (without the argument) is equivalent to `--verbose errors,warnings`, and the
> second one (empty string argument) means logging is completely disabled,
> jpackage prints nothing to the console.
Thanks for explanation. I miss `""` part.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29515#discussion_r3157396543