Permalink
Browse files

Redirect stderr to stdout.

  • Loading branch information...
1 parent 9294efe commit 0ced56e52a9d6cbd187ae121e50cacaf2fa0490a @alloy committed Feb 3, 2012
Showing with 6 additions and 2 deletions.
  1. +1 −1 Rakefile
  2. +5 −1 lib/kicker/utils.rb
View
@@ -23,7 +23,7 @@ end
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/**/*_test.rb']
- t.options = '-rs'
+ #t.options = '-rs'
end
namespace :docs do
View
@@ -10,7 +10,11 @@ def execute(command, &block)
puts unless Kicker.silent?
$stdout.sync = true
output = ""
- IO.popen(command) do |stdout|
+ # On redirect stderr to stdout the lame way:
+ # http://unethicalblogger.com/2011/11/12/popen-can-suck-it.html
+ #
+ # TODO use the new API in 1.9 which can redirect streams
+ IO.popen("#{command} 2>&1") do |stdout|
while str = stdout.read(1)
output << str
$stdout.print str unless Kicker.silent?

0 comments on commit 0ced56e

Please sign in to comment.