Commit e5e8c694 authored by Samuel Giddins's avatar Samuel Giddins

[SourcesManager] Use Executable to determine whether a directory is a git repo

parent bcae7adc
...@@ -340,8 +340,9 @@ module Pod ...@@ -340,8 +340,9 @@ module Pod
# @return [Bool] Whether the given source is a GIT repo. # @return [Bool] Whether the given source is a GIT repo.
# #
def git_repo?(dir) def git_repo?(dir)
Dir.chdir(dir) { `git rev-parse >/dev/null 2>&1` } Dir.chdir(dir) do
$?.success? Executable.capture_command('git', %w(rev-parse), :capture => :none).success?
end
end end
# Checks the version information of the source with the given directory. # Checks the version information of the source with the given directory.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment