mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
!= 0 vs !foo.zero?
Signed-off-by: Miah Johnson <miah@chia-pet.org>
This commit is contained in:
parent
a5309ea392
commit
c458897ad1
2 changed files with 3 additions and 2 deletions
|
@ -95,7 +95,8 @@ module Inspec::Resources
|
|||
class LinuxFileSystemResource < FsManagement
|
||||
def info(partition)
|
||||
cmd = inspec.command("df #{partition} -T")
|
||||
raise Inspec::Exceptions::ResourceFailed, "Unable to get available space for partition #{partition}" if cmd.stdout.nil? || cmd.stdout.empty? || !cmd.exit_status.zero?
|
||||
raise Inspec::Exceptions::ResourceFailed,
|
||||
"Unable to get available space for partition #{partition}" if cmd.stdout.nil? || cmd.stdout.empty? || cmd.exit_status != 0
|
||||
value = cmd.stdout.split(/\n/)[1].strip.split(" ")
|
||||
{
|
||||
name: partition,
|
||||
|
|
|
@ -25,7 +25,7 @@ module Inspec::Resources
|
|||
return skip_resource "The `nginx` binary not found in the path provided." unless inspec.command(nginx_path).exist?
|
||||
|
||||
cmd = inspec.command("#{nginx_path} -V 2>&1")
|
||||
if !cmd.exit_status.zero?
|
||||
if cmd.exit_status != 0
|
||||
return skip_resource "Error using the command nginx -V"
|
||||
end
|
||||
@data = cmd.stdout
|
||||
|
|
Loading…
Reference in a new issue