lib/rake/funnel/integration/sync_output.rb in rake-funnel-0.10.0.pre vs lib/rake/funnel/integration/sync_output.rb in rake-funnel-0.11.0.pre
- old
+ new
@@ -1,11 +1,18 @@
module Rake
module Funnel
module Integration
class SyncOutput
def initialize
- $stdout.sync = true
- $stderr.sync = true
+ sync($stdout)
+ sync($stderr)
+ end
+
+ private
+ def sync(stream)
+ stream.sync = true
+ rescue => e
+ Rake.rake_output_message "Failed to set up sync output #{e}"
end
end
end
end
end