simplify resiliance

This commit is contained in:
Dominik Richter 2015-11-01 23:48:29 +01:00
parent cdab39079a
commit d328919370

View file

@ -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