Commit db0a1332 authored by Eloy Duran's avatar Eloy Duran

Always read output of appledoc and raise when there's an error.

parent d3bd2989
...@@ -57,7 +57,7 @@ module Pod ...@@ -57,7 +57,7 @@ module Pod
rescue Exception => e rescue Exception => e
if e.is_a?(Informative) if e.is_a?(Informative)
puts e.message puts e.message
puts *e.backtrace if Config.instance.verbose puts *e.backtrace if Config.instance.verbose?
else else
puts ErrorReport.report(e) puts ErrorReport.report(e)
end end
......
...@@ -94,16 +94,15 @@ module Pod ...@@ -94,16 +94,15 @@ module Pod
arguments += ['--print-settings'] if config.verbose? arguments += ['--print-settings'] if config.verbose?
arguments += files.map(&:to_s) arguments += files.map(&:to_s)
process = Open4.popen4('appledoc', *arguments) do |_, _, output, error| output = error = nil
if config.verbose? process = Open4.popen4('appledoc', *arguments) do |_, __, out, err|
puts output.read.chomp output, error = out.read, err.read
puts error.read.chomp
end
end end
# appledoc exits with 1 if a warning was logged # appledoc exits with 1 if a warning was logged
if process.exited? && (process.exitstatus >= 2) && !config.silent? if process.exitstatus >= 2
puts "[!] Appledoc encountered an error. Run 'pod install --verbose' for details." puts output, error
raise "Appledoc encountered an error."
end end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment