ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwadamson <...@git.apache.org>
Subject [GitHub] ant issue #24: fix 60150 values containing backtick or $ character cause she...
Date Mon, 10 Oct 2016 19:37:08 GMT
Github user jwadamson commented on the issue:

    https://github.com/apache/ant/pull/24
  
    So I think I figured out some of this in terms of why escaping was so funny.
    Also found an issue with sed on mac (no group-0 reference) in my earlier
    fix.
    
    The bash variable replacement syntax is perfect, but while it works on bash
    and ksh, does not on dash (other shells unknown).
    
    Outside of that, the only problem (other than non-mac, non-ubuntu testing)
    remaining is whitespace handling.
    
    I looked into using awk insetad of sed. That might be better in terms of
    portability, but has the same empty line/newline style problems parsing
    input arguments.
    
    I can not figure out a way to do a 100% white-space-preserving string
    replacement using the typical commands.
    
    My sample command is:
    
    >
    > ./ant --execdebug -v
    > "-Dfoo=dollar\$_backtick\`_single'_double\"_trailingbackslash\\"
    > "-Dbar=trailingnewline
    > "
    
    
    And test build.xml is :
    
    > <project default="default">
    >   <target name="default">
    >     <echo>start</echo>
    >     <echo>foo=${foo}</echo>
    >     <echo message="bar=${bar}X${line.separator} Y"/>
    >     <echo>done</echo>
    >   </target>
    > </project>
    
    
    Current version which includes hard coded flags for using any of bash, sed,
    or awk is here
      https://github.com/jwadamson/ant-1/tree/fix-60150_1.9.x
    and
      https://github.com/jwadamson/ant-1/blob/fix-60150_1.9.x/src/script/ant
    
    
    I am now sub'd to the dev and user ant lists. If I the thread for this
    topic I can include this info.
    
    
    
    --Jeff
    
    On Mon, Oct 10, 2016 at 12:13 PM, Stefan Bodewig <notifications@github.com>
    wrote:
    
    > Thanks Jeff. I've asked for help on the dev and user mailing lists. It's
    > not only Solaris but also HP/UX which may be even more difficult to get
    > hold of.
    >
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/ant/pull/24#issuecomment-252668112>, or mute
    > the thread
    > <https://github.com/notifications/unsubscribe-auth/AANHKy2YBd6xACbgz-QE19bzA63VxPw2ks5qymRFgaJpZM4KA3ym>
    > .
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message