lib/spandx/cli/main.rb in spandx-0.13.3 vs lib/spandx/cli/main.rb in spandx-0.13.4

- old
+ new

@@ -6,14 +6,14 @@ desc 'scan LOCKFILE', 'Scan a lockfile and list dependencies/licenses' method_option :help, aliases: '-h', type: :boolean, desc: 'Display usage information' method_option :recursive, aliases: '-R', type: :boolean, desc: 'Perform recursive scan', default: false method_option :airgap, aliases: '-a', type: :boolean, desc: 'Disable network connections', default: false method_option :logfile, aliases: '-l', type: :string, desc: 'Path to a logfile', default: '/dev/null' - method_option :format, aliases: '-f', type: :string, desc: 'Format of report', default: 'table' + method_option :format, aliases: '-f', type: :string, desc: 'Format of report. (table, csv, json, hash)', default: 'table' method_option :pull, aliases: '-p', type: :boolean, desc: 'Pull the latest cache before the scan', default: false method_option :require, aliases: '-r', type: :string, desc: 'Causes spandx to load the library using require.', default: nil method_option :show_progress, aliases: '-sp', type: :boolean, desc: 'Shows a progress bar', default: true - def scan(lockfile) + def scan(lockfile = Pathname.pwd) if options[:help] invoke :help, ['scan'] else Spandx.airgap = options[:airgap] Spandx.logger = Logger.new(options[:logfile])