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 2012/06/21 17:07:57 UTC

[Bug 53449] Exec task output is truncated

https://issues.apache.org/bugzilla/show_bug.cgi?id=53449

--- Comment #1 from ryan.dyer@hp.com ---
I am running into a problem where exec is truncating the output of the command
being issued when directing it to an output property.   This does not occur
100% of the time, but it is occurring fairly often.  Below is an example of the
exec task I am performing :
  <exec executable="sed" input="rpm.spec" output="${rpm_spec}" >
      <arg line="&apos;s#&lt;PRODUCT&gt;#${product}#;
s#&lt;VERSION&gt;#${VERS}#; s#&lt;RELEASE&gt;#${RELEASE}#; s#&lt;
ID&gt;#${ID}#; s#&lt;TMP_DIR&gt;#${tmp_dir}#;
s#&lt;SANDBOX&gt;#${basedir}#&apos;" />
    </exec>

the rpm.spec file is just your standard RPM spec file for one of our products. 
I don't know if the problem is with exec itself or with some combination of
exec and sed.  I have also seen this problem when using exec of sh and args of
find and sed to create a file.  In all the instances where I have seen this
fail, sed is present, but I don't believe we have any cases of using exec where
sed is not present that could potentially fail to begin with.  

I have worked around this problem by using echo to have ant create a temporary
script file containing the thing I want done, and then execing it without any
problems.

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