Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-07-29 19:03:15 +0300
committerStan Hu <stanhu@gmail.com>2015-07-30 16:53:23 +0300
commitee1710284883d4cf61fc89d5197beef63646a220 (patch)
tree8bc8966a0afa55a31518d60114d1e2a57a7ed66a /lib/tasks
parent82f0d3e655c48fc67adea88af681d0b5d81810de (diff)
Check that hooks directory exists before attempting to call realpath
Closes #2121
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gitlab/check.rake8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake
index aed84226a2f..badb47c6779 100644
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -485,7 +485,8 @@ namespace :gitlab do
if project.empty_repo?
puts "repository is empty".magenta
- elsif File.realpath(project_hook_directory) == File.realpath(gitlab_shell_hooks_path)
+ elsif File.directory?(project_hook_directory) && File.directory?(gitlab_shell_hooks_path) &&
+ (File.realpath(project_hook_directory) == File.realpath(gitlab_shell_hooks_path))
puts 'ok'.green
else
puts "wrong or missing hooks".red
@@ -754,7 +755,7 @@ namespace :gitlab do
print "Ruby version >= #{required_version} ? ... "
if current_version.valid? && required_version <= current_version
- puts "yes (#{current_version})".green
+ puts "yes (#{current_version})".green
else
puts "no".red
try_fixing_it(
@@ -772,7 +773,7 @@ namespace :gitlab do
print "Git version >= #{required_version} ? ... "
if current_version.valid? && required_version <= current_version
- puts "yes (#{current_version})".green
+ puts "yes (#{current_version})".green
else
puts "no".red
try_fixing_it(
@@ -806,4 +807,3 @@ namespace :gitlab do
end
end
end
-