lib/spandx/cli/main.rb in spandx-0.13.4 vs lib/spandx/cli/main.rb in spandx-0.13.5
- old
+ new
@@ -6,17 +6,17 @@
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. (table, csv, json, hash)', default: 'table'
+ method_option :format, aliases: '-f', type: :string, desc: 'Format of report. (table, csv, json)', 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 = Pathname.pwd)
if options[:help]
invoke :help, ['scan']
else
+ Oj.default_options = { mode: :strict }
Spandx.airgap = options[:airgap]
Spandx.logger = Logger.new(options[:logfile])
pull if options[:pull]
Spandx::Cli::Commands::Scan.new(lockfile, options).execute
end