gitlab:check should check realpath of repo_path not just the last component for realness
Created by: PAStheLoD
Hello!
After upgrade from 3.0 to 5.3 I was wondering what was going on with the update hook, and it turns out that check's report is a bit misleading. I didn't wanted to fork the whole repo just for a one-line edit, so excuse this lame patch:
--- a/lib/tasks/gitlab/check.rake
+++ b/lib/tasks/gitlab/check.rake
@@ -432,7 +432,7 @@ namespace :gitlab do
return
end
- unless File.symlink?(repo_base_path)
+ unless File.realpath(repo_base_path) == repo_base_path
puts "no".green
else
puts "yes".red
https://github.com/gitlabhq/gitlabhq/blob/master/lib/tasks/gitlab/check.rake#L435