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 Thu, 21 Apr 2016 21:18:22 GMT

--- Comment #5 from ---
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

'-Dbranch.command="co' -r '"'

In /bin/sh, quoting does not nest. So the example command line has 3 separate
arguments passed to ant:
  `"` (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.

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

View raw message