mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
In mock setups like inspec check
the command resource was executed since inspec.os.name was “” instead of unknown. I changed to nil to catch that case. (#2056)
Signed-off-by: Christoph Hartmann <chris@lollyrock.com>
This commit is contained in:
parent
b97b9c0fb9
commit
69cf0514f2
1 changed files with 1 additions and 1 deletions
|
@ -47,7 +47,7 @@ module Inspec::Resources
|
|||
|
||||
def exist?
|
||||
# silent for mock resources
|
||||
return false if inspec.os[:name].to_s == 'unknown'
|
||||
return false if inspec.os.name.nil?
|
||||
|
||||
if inspec.os.linux?
|
||||
res = inspec.backend.run_command("bash -c 'type \"#{@command}\"'")
|
||||
|
|
Loading…
Reference in a new issue