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
rescue Exception => e
if e.is_a?(Informative)
puts e.message
puts *e.backtrace if Config.instance.verbose
puts *e.backtrace if Config.instance.verbose?
else
puts ErrorReport.report(e)
end
......
......@@ -94,16 +94,15 @@ module Pod
arguments += ['--print-settings'] if config.verbose?
arguments += files.map(&:to_s)
process = Open4.popen4('appledoc', *arguments) do |_, _, output, error|
if config.verbose?
puts output.read.chomp
puts error.read.chomp
end
output = error = nil
process = Open4.popen4('appledoc', *arguments) do |_, __, out, err|
output, error = out.read, err.read
end
# appledoc exits with 1 if a warning was logged
if process.exited? && (process.exitstatus >= 2) && !config.silent?
puts "[!] Appledoc encountered an error. Run 'pod install --verbose' for details."
if process.exitstatus >= 2
puts output, error
raise "Appledoc encountered an error."
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