lib/travis/cli/command.rb in travis-1.5.3 vs lib/travis/cli/command.rb in travis-1.5.4
- old
+ new
@@ -169,13 +169,13 @@
end
usage << " [options]"
"Usage: " << color(usage, :command)
end
- def help
+ def help(info = "")
parser.banner = usage
- self.class.description.sub(/./) { |c| c.upcase } + ".\n" + parser.to_s
+ self.class.description.sub(/./) { |c| c.upcase } + ".\n" + info + parser.to_s
end
def say(data, format = nil, style = nil)
terminal.say format(data, format, style)
end
@@ -218,11 +218,11 @@
def template(*args)
File.read(*args).split('__END__', 2)[1].strip
end
def color(line, style)
- return line unless interactive?
- terminal.color(line, Array(style).map(&:to_sym))
+ return line.to_s unless interactive?
+ terminal.color(line || '???', Array(style).map(&:to_sym))
end
def interactive?(io = output)
return io.tty? if force_interactive.nil?
force_interactive