ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53789] New: bin/ant mishandles quotes
Date Tue, 28 Aug 2012 14:16:50 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53789

          Priority: P2
            Bug ID: 53789
          Assignee: notifications@ant.apache.org
           Summary: bin/ant mishandles quotes
          Severity: normal
    Classification: Unclassified
                OS: Linux
          Reporter: jglick@apache.org
          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.

Mime
View raw message