lib/spandx/cli/main.rb in spandx-0.12.2 vs lib/spandx/cli/main.rb in spandx-0.12.3
- old
+ new
@@ -33,14 +33,16 @@
end
desc 'build', 'Build a package index'
method_option :help, aliases: '-h', type: :boolean, desc: 'Display usage information'
method_option :directory, aliases: '-d', type: :string, desc: 'Directory to build index in', default: '.index'
+ method_option :logfile, aliases: '-l', type: :string, desc: 'Path to a logfile', default: '/dev/null'
method_option :index, aliases: '-i', type: :string, desc: 'The specific index to build', default: :all
def build(*)
if options[:help]
invoke :help, ['build']
else
+ Spandx.logger = Logger.new(options[:logfile])
Commands::Build.new(options).execute
end
end
desc 'version', 'spandx version'