mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +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)
|
||||
@osenv = env
|
||||
cmd = inspec.command("su - root -c 'echo $#{env}'")
|
||||
return if cmd.exit_status != 0
|
||||
@content = cmd.stdout
|
||||
@content = @content.chomp if !@content.nil?
|
||||
@content = cmd.stdout.chomp
|
||||
@content = nil if cmd.exit_status != 0
|
||||
end
|
||||
|
||||
def split
|
||||
|
|
Loading…
Reference in a new issue