Commit 462a15d5 authored by Samuel Giddins's avatar Samuel Giddins

Be defensive when passing potentially nil strings to Gem::Version

parent 815f56bf
......@@ -114,7 +114,9 @@ module Pod
#
def self.git_version
raw_version = Executable.capture_command('git', ['--version']).first
match = raw_version.scan(/\d+\.\d+\.\d+/).first
unless match = raw_version.scan(/\d+\.\d+\.\d+/).first
raise "Failed to extract git version from `git --version` (#{raw_version.inspect})"
end
Gem::Version.new(match)
end
......
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