class ChefCLI::Policyfile::GitLockFetcher
def git(command, options = {})
-
(String)
-
Parameters:
-
error
(Boolean
) -- -
command
(String
) --
def git(command, options = {}) error = options[:error] || true unless which("git") || which("git.exe") || which("git.bat") raise GitNotInstalled end response = Mixlib::ShellOut.new(%{git #{command}}, options) response.run_command if error && response.error? raise GitError.new "#{command} #{cache_path}: #{response.stderr}" end response.stdout.strip end