Method: Inspec::InspecCLI#detect

Defined in:
lib/inspec/cli.rb

#detectObject



120
121
122
123
124
125
126
127
128
129
130
131
132
# File 'lib/inspec/cli.rb', line 120

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 "#{mark_text(item.to_s.capitalize + ':')} #{res[item.to_sym]}"
    }
  end
end