mirror of
https://github.com/inspec/inspec
synced 2024-11-10 23:24:18 +00:00
improvement: run etc_group on unix only
This commit is contained in:
parent
028e7f977e
commit
3e9526d992
1 changed files with 4 additions and 0 deletions
|
@ -32,6 +32,10 @@ class EtcGroup < Vulcano.resource(1)
|
|||
def initialize(path = nil)
|
||||
@path = path || '/etc/group'
|
||||
@entries = parse_group(@path)
|
||||
|
||||
# skip resource if it is not supported on current OS
|
||||
return skip_resource 'The `etc_group` resource is not supported on your OS.' \
|
||||
unless %w{ubuntu debian redhat fedora arch darwin freebsd}.include?(vulcano.os[:family])
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
|
Loading…
Reference in a new issue