lib/kitchen/provisioner/chef/policyfile.rb
# Ensure the `chef` command is in the path.
#
# @param logger [Kitchen::Logger] the logger to use
# @raise [UserError] if the `chef` command is not in the PATH
# @api private
Ensure the `chef` command is in the path.
Ensure the ` chef ` command is in the path .
def detect_chef_command!(logger)
            unless ENV["PATH"].split(File::PATH_SEPARATOR).any? do |p|
              File.exist?(File.join(p, "chef"))
            end
              logger.fatal("The `chef` executable cannot be found in your " \
                          "PATH. Ensure you have installed ChefDK from " \
                          "https://downloads.chef.io and that your PATH " \
                          "setting includes the path to the `chef` comand.")
              raise UserError,
                    "Could not find the chef executable in your PATH."
            end
          end
def detect_chef_command! ( logger ) unless ENV [ "PATH" ] . split ( File :: PATH_SEPARATOR ) . any? do | p | File . exist? ( File . join ( p , "chef" ) ) end logger . fatal ( "The `chef` executable cannot be found in your " "PATH. Ensure you have installed ChefDK from " "https://downloads.chef.io and that your PATH " "setting includes the path to the `chef` comand." ) raise UserError , "Could not find the chef executable in your PATH." end end
Ensure the `chef` command is in the path.
Ensure the ` chef ` command is in the path .
[UserError] if the `chef` command is not in the PATH
[ UserError ] if the ` chef ` command is not in the PATH
logger
the logger to use
the logger to use
api
None