You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2006/02/23 19:36:49 UTC

DO NOT REPLY [Bug 38771] New: - apply task strips needed quote character from command line

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771

           Summary: apply task strips needed quote character from command
                    line
           Product: Ant
           Version: 1.6.5
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: bpracht@nc.rr.com


I'm trying to compile a C program with a fix level that must be passed in as a
string macro.  I'd like to have the program do something like 
    cc -c -o program.o -DFIXLVL=\"testFixLevel\" program.c
such that the quote characters are placed in the C program.  It reports that it
passes on the quote characters, but it really doesn't.  Included below are test
files needed to run this scenario.  Please run ant -debug to verify and observe
the -DFIXLVL on both Ant's output and the output from listargs.  

Thanks,
Ben
---------- begin build.xml ----------------
<?xml version="1.0"?>
<project name="escapeQuoteCharacter" default="run_test_case">

    <!-- 
    Build listargs program to list arguments as truly passed in to called    
program.
    Assumes MSVC, but should be easy to change to something else as needed.
    -->
    <target name="build_listargs">
        <apply executable="cl" dest="." parallel="false">
            <targetfile/>
            <srcfile/>
            <fileset dir=".">
                <include name="listargs.cpp" />
            </fileset>
            <mapper type="glob" from="*.cpp" to="*.exe"/>
        </apply>
    </target>

    <!-- 
    Call listargs program to verify quotes still in -DFIXLVL argument.  The
    -debug option in ant claims they are, listargs says the quotes are missing.

    In otherwords:
    Expected call (and what's reported by the -debug option in ant):  
    listargs -c -o cprogram.obj -'DFIXLVL="test"' cprogram.c 

    Actual call:
    listargs -c -o cprogram.obj -'DFIXLVL=test' cprogram.c 
    -->
    <target name="run_test_case" depends="build_listargs">
        <apply executable="listargs" dest="." parallel="false">
            <arg value="-c"/>
            <arg value="-o"/>
            <targetfile/>
            <arg value="'-DFIXLVL=&quot;test&quot;'"/>
            <srcfile/>
            <fileset dir=".">
                <include name="cprogram.c" />
            </fileset>
            <mapper type="glob" from="*.c" to="*.obj"/>
        </apply>
    </target>
</project>
---------- end build.xml ----------------

---------- begin cprogram.c -------------
static const char fixlevel[] = " " __FILE__ " at " FIXLVL " on " __DATE__ " at "
__TIME__ " ";

int main(int argc, char* argv[])
{
    printf("fixlevel=%s\n",fixlevel);
    return 0;
}
---------- end cprogram.c ---------------

---------- begin listargs.cpp -----------
#include <stdio.h>

int main(int argc, char* argv[])
{
    int i=0;
    for(;i<argc-1;i++)
    {
        printf("%s ",argv[i]);
    }
    printf("%s\n",argv[i]);
    return 0;
}
---------- end listargs.cpp -------------

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771


bpracht@nc.rr.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From bpracht@nc.rr.com  2006-02-23 20:13 -------
Created an attachment (id=17784)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17784&action=view)
Build file to run test case

Please run this build file using -debug to show what Ant reports that it's
passing to the command line program.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From bpracht@nc.rr.com  2006-02-23 20:14 -------
Created an attachment (id=17785)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17785&action=view)
C Program requiring quoted macro string


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From bpracht@nc.rr.com  2006-02-23 20:55 -------
(In reply to comment #8)
> (In reply to comment #7)
> > Hmm.  Now how does that make sense?  Hmm... the only way is that the problem is
> > in the Windows APIs (that I am guessing are) shared by CMD.EXE and the JVM's
> > process execution component.
> 
> My point being that perhaps a direct call to CMD goes through one less level of
> processing... ?
> 
> 
That's interesting, but irritating.  Btw, I modified my test case, and verified
that the quote disappears even when it's in the middle of an argument.  Someone
did something bad somewhere.
(In reply to comment #10)
> another interesting note is that while quotes are preserved on e.g. cmd /c echo
> ..., they are stripped when you call e.g. cygwin "echo" directly... also cmd /c
> cmd /c echo ... preserves quotes.  Still the only workable conclusion I can see
> is that cmd is treated differently from other executables... which is
> dissatisfyingly cryptic.

That's interesting, but irritating.  Btw, I modified my test case, and verified
that the quote disappears even when it's in the middle of an argument.  Someone
did something bad somewhere.

So is the only solution to call cmd.exe /c then?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From gudnabrsam@yahoo.com  2006-02-23 20:42 -------
(In reply to comment #6)
> Actually it works for cmd:
> 

Hmm.  Now how does that make sense?  Hmm... the only way is that the problem is
in the Windows APIs (that I am guessing are) shared by CMD.EXE and the JVM's
process execution component.  I don't have a Unix box anymore :( ... can anyone
run a test to see if quotes are preserved in arguments on a non-Windows platform?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From gudnabrsam@yahoo.com  2006-02-23 20:52 -------
another interesting note is that while quotes are preserved on e.g. cmd /c echo
..., they are stripped when you call e.g. cygwin "echo" directly... also cmd /c
cmd /c echo ... preserves quotes.  Still the only workable conclusion I can see
is that cmd is treated differently from other executables... which is
dissatisfyingly cryptic.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From gudnabrsam@yahoo.com  2006-02-23 20:43 -------
(In reply to comment #7)
> Hmm.  Now how does that make sense?  Hmm... the only way is that the problem is
> in the Windows APIs (that I am guessing are) shared by CMD.EXE and the JVM's
> process execution component.

My point being that perhaps a direct call to CMD goes through one less level of
processing... ?



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From gudnabrsam@yahoo.com  2006-02-23 20:15 -------
Created an attachment (id=17787)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17787&action=view)
Example showing that this is not Ant's fault

extract the files into a folder and run ant.  You will see two sets of output,
one from calling "java ShowArgs" with <exec> and quotes embedded in XML args;
the other calling Run with <java>, which uses the core Java APIs to run java
ShowArgs with quotes specified in arguments.  The quotes still disappear; thus
I must attribute this behavior to Java.  I am running Sun JDK 1.4.2_10.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From bpracht@nc.rr.com  2006-02-23 20:30 -------
(In reply to comment #4)
> Created an attachment (id=17787)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17787&action=view) [edit]
> Example showing that this is not Ant's fault
> 
> extract the files into a folder and run ant.  You will see two sets of output,
> one from calling "java ShowArgs" with <exec> and quotes embedded in XML args;
> the other calling Run with <java>, which uses the core Java APIs to run java
> ShowArgs with quotes specified in arguments.  The quotes still disappear; thus
> I must attribute this behavior to Java.  I am running Sun JDK 1.4.2_10.
Thanks for your quick response.
Unfortunately, your example is missing the arguments for the   <java
classname="Run" classpath="." />.
But, if I understand what you're saying, Ant is correctly converting &quot; to
quote (") in the string, then calling making a core Java API call to run
java.exe with the specified arguments, including the quoted argument.  Then, the
Java API, according to your example must be stripping out quotes in the middle
of the argument.  Am I correct?  If so, which core API call is it making, and
can I have an example of it?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From alexeys@inventigo.com  2006-02-23 20:47 -------
Just a note - single quotes do not work on Windows. Besides this <apply> also works:

  <apply executable="cmd.exe" dest="." parallel="false">
    <arg value="/c"/>
    <arg value="ShowArgs.cmd" />
    <arg value="-c"/>
    <arg value="-o"/>
    <targetfile/>
    <arg value="'-DFIXLVL=&quot;test&quot;'"/>
    <srcfile/>
    <fileset dir=".">
      <include name="*.java" />
    </fileset>
    <mapper type="glob" from="*.java" to="*.test"/>
  </apply>


output:
    [apply] Current OS is Windows XP
    [apply] Warning: Run.java modified in the future.
    [apply] Warning: ShowArgs.java modified in the future.
    [apply] Run.java added as Run.test doesn't exist.
    [apply] ShowArgs.java added as ShowArgs.test doesn't exist.
    [apply] Executing 'cmd.exe' with arguments:
    [apply] '/c'
    [apply] 'ShowArgs.cmd'
    [apply] '-c'
    [apply] '-o'
    [apply] 'C:\tmp\ant\Run.test'
    [apply] ''-DFIXLVL="test"''
    [apply] 'C:\tmp\ant\Run.java'
    [apply]
    [apply] The ' characters around the executable and arguments are
    [apply] not part of the command.

    [apply] C:\tmp\ant>echo -c -o C:\tmp\ant\Run.test '-DFIXLVL="test"'
C:\tmp\ant\Run.java
    [apply] -c -o C:\tmp\ant\Run.test '-DFIXLVL="test"' C:\tmp\ant\Run.java

    [apply] C:\tmp\ant>exit
    [apply] Executing 'cmd.exe' with arguments:
    [apply] '/c'
    [apply] 'ShowArgs.cmd'
    [apply] '-c'
    [apply] '-o'
    [apply] 'C:\tmp\ant\ShowArgs.test'
    [apply] ''-DFIXLVL="test"''
    [apply] 'C:\tmp\ant\ShowArgs.java'
    [apply]
    [apply] The ' characters around the executable and arguments are
    [apply] not part of the command.

    [apply] C:\tmp\ant>echo -c -o C:\tmp\ant\ShowArgs.test '-DFIXLVL="test"'
C:\tmp\ant\ShowArgs.java
    [apply] -c -o C:\tmp\ant\ShowArgs.test '-DFIXLVL="test"'
C:\tmp\ant\ShowArgs.java

    [apply] C:\tmp\ant>exit
    [apply] Applied cmd.exe to 2 files and 0 directories.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From alexeys@inventigo.com  2006-02-23 20:36 -------
Actually it works for cmd:

     [exec] Current OS is Windows XP
     [exec] Executing 'cmd.exe' with arguments:
     [exec] '/c'
     [exec] 'ShowArgs.cmd'
     [exec] 'foo'
     [exec] 'bar'
     [exec] '"baz"'
     [exec] '1"2'
     [exec]
     [exec] The ' characters around the executable and arguments are
     [exec] not part of the command.

     [exec] C:\tmp\ant>echo foo bar "baz" 1"2
     [exec] foo bar "baz" 1"2

     [exec] C:\tmp\ant>exit

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771


bpracht@nc.rr.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |INVALID




------- Additional Comments From bpracht@nc.rr.com  2006-02-23 21:07 -------
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > Hmm.  Now how does that make sense?  Hmm... the only way is that the
> problem is
> > > > in the Windows APIs (that I am guessing are) shared by CMD.EXE and the JVM's
> > > > process execution component.
> > > 
> > > My point being that perhaps a direct call to CMD goes through one less
level of
> > > processing... ?
> > > 
> > > 
> > That's interesting, but irritating.  Btw, I modified my test case, and verified
> > that the quote disappears even when it's in the middle of an argument.  Someone
> > did something bad somewhere.
> > (In reply to comment #10)
> > > another interesting note is that while quotes are preserved on e.g. cmd /c
echo
> > > ..., they are stripped when you call e.g. cygwin "echo" directly... also
cmd /c
> > > cmd /c echo ... preserves quotes.  Still the only workable conclusion I
can see
> > > is that cmd is treated differently from other executables... which is
> > > dissatisfyingly cryptic.
> > 
> > That's interesting, but irritating.  Btw, I modified my test case, and verified
> > that the quote disappears even when it's in the middle of an argument.  Someone
> > did something bad somewhere.
> > 
> > So is the only solution to call cmd.exe /c then?
> 
> If so, how would I then make that call to cl.exe or whatever compiler, given
> that it'll have those quote characters in them?


I just tried cmd.exe from the command line, and it still stripped the quote
characters, so I can now blame Microsoft.  My solution was to do something like
this "-DFIXLVL=\&quot;Test\&quot;", and that seems to work, at least for
Windows.  While this is not an Ant bug, this kind of information would still be
useful in the Ant docs somewhere.

Thanks for your help, I've remarked the bug as invalid.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771


gudnabrsam@yahoo.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From bpracht@nc.rr.com  2006-02-23 20:58 -------
(In reply to comment #11)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > Hmm.  Now how does that make sense?  Hmm... the only way is that the
problem is
> > > in the Windows APIs (that I am guessing are) shared by CMD.EXE and the JVM's
> > > process execution component.
> > 
> > My point being that perhaps a direct call to CMD goes through one less level of
> > processing... ?
> > 
> > 
> That's interesting, but irritating.  Btw, I modified my test case, and verified
> that the quote disappears even when it's in the middle of an argument.  Someone
> did something bad somewhere.
> (In reply to comment #10)
> > another interesting note is that while quotes are preserved on e.g. cmd /c echo
> > ..., they are stripped when you call e.g. cygwin "echo" directly... also cmd /c
> > cmd /c echo ... preserves quotes.  Still the only workable conclusion I can see
> > is that cmd is treated differently from other executables... which is
> > dissatisfyingly cryptic.
> 
> That's interesting, but irritating.  Btw, I modified my test case, and verified
> that the quote disappears even when it's in the middle of an argument.  Someone
> did something bad somewhere.
> 
> So is the only solution to call cmd.exe /c then?

If so, how would I then make that call to cl.exe or whatever compiler, given
that it'll have those quote characters in them?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 38771] - apply task strips needed quote character from command line

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38771>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38771





------- Additional Comments From bpracht@nc.rr.com  2006-02-23 20:15 -------
Created an attachment (id=17786)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=17786&action=view)
C/C++ Program to list arguments passed into it.

This program is used to show what really gets passed into the called program,
which is not the same as what Ant reports.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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