Commit a4961a6d authored by Samuel E. Giddins's avatar Samuel E. Giddins

Merge pull request #4976 from CocoaPods/seg-git-repo-executable

[SourcesManager] Use Executable to determine whether a directory is a…
parents bcae7adc e5e8c694
......@@ -340,8 +340,9 @@ module Pod
# @return [Bool] Whether the given source is a GIT repo.
#
def git_repo?(dir)
Dir.chdir(dir) { `git rev-parse >/dev/null 2>&1` }
$?.success?
Dir.chdir(dir) do
Executable.capture_command('git', %w(rev-parse), :capture => :none).success?
end
end
# 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