You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2016/09/19 19:12:57 UTC

[Bug 60150] New: back-tick fails ant shell script

https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

            Bug ID: 60150
           Summary: back-tick fails ant shell script
           Product: Ant
           Version: 1.9.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Wrapper scripts
          Assignee: notifications@ant.apache.org
          Reporter: jwadamson@gmail.com

Passing a back-tick character literal to the ant shell script fails on *nix

$ ant -Dfoo='ba`r'
/home/jwa/.sdkman/candidates/ant/current/bin/ant: 1: eval: Syntax error: EOF in
backquote substitution

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

--- Comment #5 from mail@lucaswerkmeister.de ---
Sorry for the stupid question, but what PR? (I got here from Bug 59445.)

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

--- Comment #8 from Stefan Bodewig <bo...@apache.org> ---
I'm sorry if you got that impression. No, github is an alternative channel
while bugzilla is supposed to be the recommended way, still.

For some reason I had put bug 59445 into the same heap of bugs that report
problems with the changed wrapper script of 1.9.7 on OSes where sed is not GNU
sed and thus not looked at it close enough. I'm not sure what could have
helped.

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
   Target Milestone|---                         |1.9.8

--- Comment #4 from Stefan Bodewig <bo...@apache.org> ---
merged your PR into master and the 1.9.8 branch - many thanks!

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

Stefan Bodewig <bo...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mail@lucaswerkmeister.de

--- Comment #3 from Stefan Bodewig <bo...@apache.org> ---
*** Bug 59445 has been marked as a duplicate of this bug. ***

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

--- Comment #1 from jwadamson@gmail.com ---
When creating double-quoted literals, the shell script does not escape them.

I am also paranoid now about $ characters. Will update shortly on if this
problem also covers that

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

--- Comment #6 from Stefan Bodewig <bo...@apache.org> ---
(In reply to mail from comment #5)
> Sorry for the stupid question, but what PR? (I got here from Bug 59445.)

oh, my fault, it's too easy to drop important context. Jeffrey had created a
pull request at github https://github.com/apache/ant/pull/24

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

--- Comment #7 from mail@lucaswerkmeister.de ---
Ah, okay, so presumably that’s where I should have left my patch if I didn’t
want it to just sit there for half a year without anyone looking at it. Thanks.

Someone might want to update https://ant.apache.org/bugs.html, because I
believe I followed the instructions there:

> Once you have a fix for the problem, you may submit the fix as a patch to either the dev mailing list, or enter the bug database as described above and attach the patch to the bug report. Using the bug database has the advantage of being able to track the progress of your patch.

Since “using the bug database” is made to sound like the preferable choice,
that’s what I did (“attaching” the patch in the issue text, since Bugzilla
seems to allow only one attachment, and I wanted to attach the tt.xml file as
well). Not exactly thrilled about the result…

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

--- Comment #2 from jwadamson@gmail.com ---
Yep, if intent is to have arguments pass through as literals, then $ also
needed escaping in the exec_args processing. Updated pull request with that as
well

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

[Bug 60150] back-tick fails ant shell script

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60150

--- Comment #9 from Stefan Bodewig <bo...@apache.org> ---
The current master branch contains a version of the script with an approach
using sed and an approach using awk. It turns out sed isn't really the same
thing acrosss OSes.

We'd really appreciate people for whom the version of 1.9.7 didn't work to help
us identify an approach that makes things work on all platforms again. Without
access to these platforms there is little we can do ourselves.

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