Method: Inspec::InspecCLI#detect
- Defined in:
- lib/inspec/cli.rb
#detect ⇒ Object
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/inspec/cli.rb', line 174 def detect o = opts.dup o[:command] = 'os.params' (_, res) = run_command(o) if opts['format'] == 'json' puts res.to_json else headline('Operating System Details') %w{name family release arch}.each { |item| puts format('%-10s %s', item.to_s.capitalize + ':', mark_text(res[item.to_sym])) } end rescue StandardError => e pretty_handle_exception(e) end |