Commit 9171cbf7 authored by Eloy Duran's avatar Eloy Duran

Always warn about appledoc missing, unless silenced.

parent 65009432
...@@ -5,6 +5,8 @@ module Pod ...@@ -5,6 +5,8 @@ module Pod
!`which appledoc`.strip.empty? !`which appledoc`.strip.empty?
end end
include Config::Mixin
attr_reader :pod, :specification, :target_path, :options attr_reader :pod, :specification, :target_path, :options
def initialize(pod) def initialize(pod)
...@@ -83,20 +85,23 @@ module Pod ...@@ -83,20 +85,23 @@ module Pod
def appledoc (options) def appledoc (options)
unless self.class.appledoc_installed? unless self.class.appledoc_installed?
puts "\n[!] Skipping documentation generation because appledoc can't be found." if Config.instance.verbose? puts "\n[!] Skipping documentation generation because appledoc can't be found." unless config.silent?
return return
end end
arguments = [] arguments = []
arguments += options arguments += options
arguments += ['--print-settings'] if Config.instance.verbose? arguments += ['--print-settings'] if config.verbose?
arguments += files arguments += files
Open3.popen3('appledoc', *arguments) do |i, o, e| Open3.popen3('appledoc', *arguments) do |i, o, e|
if Config.instance.verbose? if config.verbose?
puts o.read.chomp puts o.read.chomp
puts e.read.chomp puts e.read.chomp
else else
# TODO: This is needed otherwise appledoc may not install the doc set # TODO: This is needed otherwise appledoc may not install the doc set
# This is a work around related to poor understanding of the IO class. # This is a work around related to poor understanding of the IO class.
#
# I think we can use the non-block version here, which should read
# everything till the end and then return.
o.read o.read
e.read e.read
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