mirror of
https://github.com/inspec/inspec
synced 2024-11-15 01:17:08 +00:00
14 lines
No EOL
332 B
Ruby
14 lines
No EOL
332 B
Ruby
# encoding: utf-8
|
|
# copyright: 2015, Vulcano Security GmbH
|
|
# license: 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 |