mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
inspec detect --no-color to not give colorful output
Signed-off-by: Nikita Mathur <nikita.mathur@chef.io>
This commit is contained in:
parent
1e96f31a0c
commit
38fd0ef56b
1 changed files with 6 additions and 1 deletions
|
@ -305,7 +305,12 @@ class Inspec::InspecCLI < Inspec::BaseCLI
|
|||
puts res.to_json
|
||||
else
|
||||
ui.headline("Platform Details")
|
||||
ui.plain Inspec::BaseCLI.format_platform_info(params: res, indent: 0, color: 36)
|
||||
|
||||
if ui.color?
|
||||
ui.plain Inspec::BaseCLI.format_platform_info(params: res, indent: 0, color: 36)
|
||||
else
|
||||
ui.plain Inspec::BaseCLI.format_platform_info(params: res, indent: 0)
|
||||
end
|
||||
end
|
||||
rescue ArgumentError, RuntimeError, Train::UserError => e
|
||||
$stderr.puts e.message
|
||||
|
|
Loading…
Add table
Reference in a new issue