mirror of
https://github.com/inspec/inspec
synced 2024-11-15 09:27:20 +00:00
cb3e067a1f
Signed-off-by: Dominik Richter <dominik@vulcanosec.com>
11 lines
No EOL
306 B
Ruby
11 lines
No EOL
306 B
Ruby
# Copyright (c) 2015 Vulcano Security GmbH. All rights reserved.
|
|
module Serverspec::Type
|
|
class Command < Base
|
|
# Check if a given command (executable) exists
|
|
# in the default path
|
|
def exists?
|
|
cmd = @name
|
|
Command.new("type \"#{cmd}\" > /dev/null").exit_status == 0
|
|
end
|
|
end
|
|
end |