mirror of
https://github.com/inspec/inspec
synced 2025-02-17 06:28:40 +00:00
simplify resiliance
This commit is contained in:
parent
cdab39079a
commit
d328919370
1 changed files with 2 additions and 3 deletions
|
@ -18,9 +18,8 @@ class OsEnv < Inspec.resource(1)
|
||||||
def initialize(env)
|
def initialize(env)
|
||||||
@osenv = env
|
@osenv = env
|
||||||
cmd = inspec.command("su - root -c 'echo $#{env}'")
|
cmd = inspec.command("su - root -c 'echo $#{env}'")
|
||||||
return if cmd.exit_status != 0
|
@content = cmd.stdout.chomp
|
||||||
@content = cmd.stdout
|
@content = nil if cmd.exit_status != 0
|
||||||
@content = @content.chomp if !@content.nil?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def split
|
def split
|
||||||
|
|
Loading…
Add table
Reference in a new issue