Ticket #8347: cli.rb_add_outputfile.3.patch
| File cli.rb_add_outputfile.3.patch, 1.2 kB (added by lhartley, 2 years ago) |
|---|
-
cli.rb
old new 95 95 # the CLI class is recommended. 96 96 def initialize(args = ARGV) 97 97 @args = args 98 @options = { :recipes => [], :actions => [], :vars => {}, 98 @options = { :recipes => [], :actions => [], :vars => {}, :output => [], 99 99 :pre_vars => {}, :sysconf => default_sysconf, :dotfile => default_dotfile } 100 100 101 101 OptionParser.new do |opts| … … 189 189 "May be given multiple times. (Default: silent)" 190 190 ) { @options[:verbose] ||= 0; @options[:verbose] += 1 } 191 191 192 opts.on("-o", "--output FILE", 193 "Specify a file for output.", 194 "(Default: STDERR)" 195 ) {|value| @options[:output] = value } 196 192 197 opts.on("-V", "--version", 193 198 "Display the version info for this utility" 194 199 ) do … … 247 252 def execute_recipes! 248 253 config = Capistrano::Configuration.new 249 254 config.logger.level = options[:verbose] 255 config.logger.setDevice({:device =>options[:output]}) 250 256 config.set :password, options[:password] 251 257 config.set :pretend, options[:pretend] 252 258