Method: Inspec::InspecCLI#archive
- Defined in:
- lib/inspec/cli.rb
#archive(path) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/inspec/cli.rb', line 90 def archive(path) diagnose o = opts.dup o[:logger] = Logger.new(STDOUT) o[:logger].level = get_log_level(o.log_level) profile = Inspec::Profile.for_target(path, o) result = profile.check if result && !opts[:ignore_errors] == false @logger.info 'Profile check failed. Please fix the profile before generating an archive.' return exit 1 end # generate archive exit 1 unless profile.archive(opts) end |