Hi there,

I'm having a few issues with FileUtils writing stuff to stderr when no
error has occurred. For example I might have the following simple
Rakefile:

require 'rake'
task :clean do
  rm_rf 'test'
end

When I run

rake clean 2> err

In the err file I see:

'rm -rf test'

I would expect this to be sent to stdout rather than err.

The problem that I have is that I am trying to detect a rake failure
from within ant. Rake doesn't seem to return the correct error code so I
was testing for failure by detecting if anything was written to stderr.
My ant task would thus look something like this:

<target name="rake">
  <exec executable="rake" failonerror="true" errorproperty="rake.err">
    <arg value="clean">
  </exec>
  <fail if="rake.err" message="Rake failed with: ${rake.err}"/>
</target>

This works fine except when I try to use the FileUtils methods. rm_rf
causes it to fail as does mkdir_p.

Any suggestions?
Cheers,
Mark.

-- 
Posted via http://www.ruby-forum.com/.