Method: Chef::Sugar::Shell#installed?

Defined in:
lib/chef/sugar/shell.rb

#installed?(cmd) ⇒ Boolean

Boolean method to check if a command line utility is installed.

Parameters:

  • the command to find

Returns:

  • true if the command is found in the path, false otherwise



66
67
68
# File 'lib/chef/sugar/shell.rb', line 66

def installed?(cmd)
  !which(cmd).nil?
end