A build system that I use at work invokes several external console applications, Node.js among others.
The issue I am seeing is the STDOUT channel seems to not work after Open3.capture3
is invoked. For instance, I have a task called compileLess
:
desc "Compile LESS"
task :compileLess do
puts "Preparing to compile LESS..."
execute "recess less/bootstrap.less --compress > output/css/bootstrap.min.css"
puts "Finished compiling LESS"
end
def execute(cmdLine, print_stdout = false)
puts "Executing #{cmdLine}"
stdout, stderr, status = Open3.capture3(cmdLine)
puts stdout if print_stdout
return stdout, stderr, status
end
What I would expect to see is something like:
Preparing to compile LESS...
Executing recess less/bootstrap.less --compress > output/css/bootstrap.min.css
Finished compiling LESS
But anything after the invocation of Open3.capture3
disables puts
and print
. I can force them to work by explicitly using:
STDOUT.puts "goodbye world"
I just want to know why it doesn't work.
Specs:
- Window 7 Professional 32 bit
- Ruby 1.9.3p392 (2013-02-22) [i386-mingw32]
- Rake, version 10.1.0
- Node v0.10.22