Commit c18564d2 authored by Sato Hiroyuki's avatar Sato Hiroyuki

Fix abort gitlab:app:check

When the file that pointed git bin_path in gitlab.yml dose'nt exist,
bundle rake gitlab:app:check would be aborted.

refs #4205
parent e7bcbb95
...@@ -5,7 +5,7 @@ module Gitlab ...@@ -5,7 +5,7 @@ module Gitlab
attr_reader :major, :minor, :patch attr_reader :major, :minor, :patch
def self.parse(str) def self.parse(str)
if m = str.match(/(\d+)\.(\d+)\.(\d+)/) if str && m = str.match(/(\d+)\.(\d+)\.(\d+)/)
VersionInfo.new(m[1].to_i, m[2].to_i, m[3].to_i) VersionInfo.new(m[1].to_i, m[2].to_i, m[3].to_i)
else else
VersionInfo.new VersionInfo.new
......
...@@ -659,7 +659,7 @@ namespace :gitlab do ...@@ -659,7 +659,7 @@ namespace :gitlab do
current_version = Gitlab::VersionInfo.parse(gitlab_shell_version) current_version = Gitlab::VersionInfo.parse(gitlab_shell_version)
print "GitLab Shell version >= #{required_version} ? ... " print "GitLab Shell version >= #{required_version} ? ... "
if required_version <= current_version if current_version.valid? && required_version <= current_version
puts "OK (#{current_version})".green puts "OK (#{current_version})".green
else else
puts "FAIL. Please update gitlab-shell to #{required_version} from #{current_version}".red puts "FAIL. Please update gitlab-shell to #{required_version} from #{current_version}".red
...@@ -673,7 +673,7 @@ namespace :gitlab do ...@@ -673,7 +673,7 @@ namespace :gitlab do
puts "Your git bin path is \"#{Gitlab.config.git.bin_path}\"" puts "Your git bin path is \"#{Gitlab.config.git.bin_path}\""
print "Git version >= #{required_version} ? ... " print "Git version >= #{required_version} ? ... "
if required_version <= current_version if current_version.valid? && required_version <= current_version
puts "yes (#{current_version})".green puts "yes (#{current_version})".green
else else
puts "no".red puts "no".red
......
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