Method: Inspec::InspecCLI#detect
- Defined in:
- lib/inspec/cli.rb
#detect ⇒ Object
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/inspec/cli.rb', line 179 def detect o = opts(:detect).dup o[:command] = 'platform.params' (_, res) = run_command(o) if o['format'] == 'json' puts res.to_json else headline('Platform Details') puts Inspec::BaseCLI.detect(params: res, indent: 0, color: 36) end rescue ArgumentError, RuntimeError, Train::UserError => e $stderr.puts e. exit 1 rescue StandardError => e pretty_handle_exception(e) end |