Commit 11e28aff7db8498dc08165717b476a7b0a34533f

Authored by Riyad Preukschas
1 parent b6ac9b43

Fix accessing the project repository path in check task

Fixes #2496
Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
lib/tasks/gitlab/check.rake
@@ -759,7 +759,7 @@ namespace :gitlab do @@ -759,7 +759,7 @@ namespace :gitlab do
759 print "#{project.name_with_namespace.yellow} ... " 759 print "#{project.name_with_namespace.yellow} ... "
760 760
761 correct_options = options.map do |name, value| 761 correct_options = options.map do |name, value|
762 - run("git --git-dir=\"#{project.path_to_repo}\" config --get #{name}").try(:chomp) == value 762 + run("git --git-dir=\"#{project.repository.path_to_repo}\" config --get #{name}").try(:chomp) == value
763 end 763 end
764 764
765 if correct_options.all? 765 if correct_options.all?
@@ -798,7 +798,7 @@ namespace :gitlab do @@ -798,7 +798,7 @@ namespace :gitlab do
798 798
799 Project.find_each(batch_size: 100) do |project| 799 Project.find_each(batch_size: 100) do |project|
800 print "#{project.name_with_namespace.yellow} ... " 800 print "#{project.name_with_namespace.yellow} ... "
801 - project_hook_file = File.join(project.path_to_repo, "hooks", hook_file) 801 + project_hook_file = File.join(project.repository.path_to_repo, "hooks", hook_file)
802 802
803 unless File.exists?(project_hook_file) 803 unless File.exists?(project_hook_file)
804 puts "missing".red 804 puts "missing".red