ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Bug 58898] ANT wrapper script can not handle double-quote or backslash characters in arguments
Date Fri, 22 Apr 2016 14:24:51 GMT

--- Comment #6 from KM <> ---
(In reply to jwadamson from comment #5)
> Thank you for the example. I think the 1.9.6 behavior in your case was
> objectively incorrect. It worked out to the right answer, but for the wrong
> reasons.
> '-Dbranch.command="co' -r '"'
> In /bin/sh, quoting does not nest. So the example command line has 3
> separate arguments passed to ant:
>   `-Dbranch.commmand="co`
>   `-r`
>   `"` (a literal double-quote)
> The ant script in 1.9.6 was smushing these back together as (quoting the
> space between each original argument)
>   `"-Dbranch.command="co" "-r" """`. 
> /bin/sh processing then interprets this mess as a single argument in the
> exec command (with some spurious empty strings concatenated into the value):
>   `-Dbranch.command=co -r `
> The ant script in 1.9.7 keeps those original 3 arguments separate and causes
> the error about the `-r` argument.

I agree. Once I looked at the evaluated value, I was actually surprised it
worked.  I've reworked the scripts to pass it the correct way.  Only the value,
and no double quotes.  works fine in both versions of ant.

You are receiving this mail because:
You are the assignee for the bug.

View raw message