lib/inspec/cli.rb in inspec-2.2.55 vs lib/inspec/cli.rb in inspec-2.2.61

- old
+ new

@@ -32,13 +32,13 @@ desc: 'A list of controls to include. Ignore all other tests.' profile_options def json(target) o = opts.dup diagnose(o) - o[:ignore_supports] = true o[:backend] = Inspec::Backend.create(target: 'mock://') o[:check_mode] = true + o[:vendor_cache] = Inspec::Cache.new(o[:vendor_cache]) profile = Inspec::Profile.for_target(target, o) info = profile.info # add in inspec version info[:generator] = { @@ -65,13 +65,13 @@ option :format, type: :string profile_options def check(path) # rubocop:disable Metrics/AbcSize o = opts.dup diagnose(o) - o[:ignore_supports] = true # we check for integrity only o[:backend] = Inspec::Backend.create(target: 'mock://') o[:check_mode] = true + o[:vendor_cache] = Inspec::Cache.new(o[:vendor_cache]) # run check profile = Inspec::Profile.for_target(path, o) result = profile.check @@ -138,9 +138,10 @@ diagnose(o) o[:logger] = Logger.new(STDOUT) o[:logger].level = get_log_level(o.log_level) o[:backend] = Inspec::Backend.create(target: 'mock://') + o[:vendor_cache] = Inspec::Cache.new(o[:vendor_cache]) profile = Inspec::Profile.for_target(path, o) result = profile.check if result && !o[:ignore_errors] == false