ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 8359] - Exec task seems to disregard quotes and apostrophes in arg attribute values.
Date Wed, 24 Apr 2002 05:27:43 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8359>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=8359

Exec task seems to disregard quotes and apostrophes in arg attribute values.





------- Additional Comments From jmoravec@austar.com.au  2002-04-24 05:27 -------
What I meant when I said that I the find runs OK locally was that when I run 
the plink with the find command (it runs the find command on a remote box) it 
worked. So the command was actually only initiated on the local host, but it 
executed on the remote host. It was just to check that the find command's 
syntax was right. Sorry about the confusion. 

I also tried to run the find command locally on my WiNT box with the results I 
described in the prev. comment. And you were right, I was running the old DOS 
find. I have got Cygwin as well, so I tried to run it with good results.

I cannot figure how this is different:

  <target name="plink">
    <exec executable="plink.exe" dir="." failonerror="true">
      <arg value="-ssh" />
      <arg value="-pw" />
      <arg value="password" />
      <arg value="itvbuild@itvapache" />
      <arg value="find" />
      <arg value="." />
      <arg value="-name" />
      <arg value="\*" />
      <arg value="-exec" />
      <arg value="echo" />
      <arg value="'{}'" />
      <arg value="';'" />
    </exec>
  </target>

Works OK, see this:
plink:
     [exec] Current OS is Windows NT
     [exec] plink.exe -ssh -pw password itvbuild@itvapache find . -name \*
-exec echo "'{}'" "';'"
     [exec] ./Desktop
     [exec] ./Desktop/kontrol-panel
     <cut>
     [exec] ./.cedit/cooledit.temp

from:
  
  <target name="plink2">
    <exec executable="plink.exe" dir="." failonerror="true">
      <arg line="-ssh -pw password itvbuild@itvapache "/>
      <arg line="find . -name \* -exec echo '{}' ';'" />
    </exec>
  </target>

Does not work, see this:
plink2:
     [exec] Current OS is Windows NT
     [exec] plink.exe -ssh -pw password itvbuild@itvapache find . -name \*
-exec echo {} ;
     [exec] find: missing argument to `-exec'

What happens when one uses <arg line=""/>? Is the contents passsed to the 
executable as a single parameter, or is it passed as it is with all the spaces? 
There must be some substiantial difference from <arg value=""/>.

Thanks,
Jan

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


Mime
View raw message