mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
dont warn on command not existing on mock backend
This commit is contained in:
parent
6e8c4f02a1
commit
ea66947b36
1 changed files with 4 additions and 1 deletions
|
@ -41,8 +41,11 @@ class Cmd < Inspec.resource(1)
|
|||
res = inspec.backend.run_command("where.exe \"#{@command}\"")
|
||||
elsif inspec.os.unix?
|
||||
res = inspec.backend.run_command("type \"#{@command}\"")
|
||||
elsif inspec.os[:family].to_s == 'unknown'
|
||||
# silent for mock resources
|
||||
return false
|
||||
else
|
||||
warn "`command(#{@command}).exist?` is not suported on you OS: #{inspec.os['family']}"
|
||||
warn "`command(#{@command}).exist?` is not suported on you OS: #{inspec.os[:family]}"
|
||||
return false
|
||||
end
|
||||
res.exit_status.to_i == 0
|
||||
|
|
Loading…
Reference in a new issue