https://issues.apache.org/bugzilla/show_bug.cgi?id=53789

          Priority: P2
            Bug ID: 53789
          Assignee: [email protected]
           Summary: bin/ant mishandles quotes
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Reporter: [email protected]
          Hardware: PC
            Status: NEW
           Version: 1.8.3
         Component: Wrapper scripts
           Product: Ant

To reproduce:

$ echo '<project><echo>${message}</echo></project>' > build.xml && echo
message='Please "don'"'"'t kill" me' && ant -Dmessage='Please "don'"'"'t kill"
me' 
message=Please "don't kill" me
/usr/local/bin/ant: 1: eval: Syntax error: Unterminated quoted string

The following line is bogus:

  ant_exec_args="$ant_exec_args \"$arg\""

[1] suggests that printf %q might work to solve this class of problem, but it
is Bash-specific (so it will not work e.g. on Ubuntu's /bin/sh).

[1]
http://stackoverflow.com/questions/6071681/store-shell-arguments-in-file-while-preserving-quoting

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

Reply via email to