On Thu, 2 Jan 2025 18:43:35 GMT, Henry Jen <henry...@openjdk.org> wrote:

>> I would expect the next token would be parsed as the value.  I suggest to 
>> explore that and see how complex it would be.
>> 
>> It seems awkward  if the following are accepted:
>> 
>> --add-options "--add-modules jdk.incubator.concurrent"
>> --add-options=--add-modules=jdk.incubator.concurrent
>> 
>> 
>> but not this:
>> 
>> --add-options "--add-modules=jdk.incubator.concurrent"
>
> I agree it's a little bit awkward, unfortunately we cannot look at the 
> quotation as that had been decoded by shell.
> 
> Just take next token as value would be simpler, see the origin PR from 
> @YaSuenag at https://github.com/openjdk/jdk/pull/19987.
> 
> The other alternative would be that, we can check next token against known 
> options of jlink, and treat it as value without match. That would limited the 
> potential ambiguous conflicts but would be even more mysterious to user?

After the update, = must be used if value is prefixed with `--`.
`--add-options=--add-modules=jdk.incubator.concurrent` will work and 
`--add-options="--add-modules=jdk.incubator.concurrent --module-path xx"` will 
work, but not -add-options "--add-modules=jdk.incubator.concurrent 
--module-path xx"`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/22526#discussion_r1907969495

Reply via email to