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:

  • cmd (String)

    the command to find

Returns:

  • (Boolean)

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



61
62
63
# File 'lib/chef/sugar/shell.rb', line 61

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