Skip to content

Commit 11e28af

Browse files
committed
Fix accessing the project repository path in check task
Fixes #2496
1 parent b6ac9b4 commit 11e28af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/tasks/gitlab/check.rake

+2-2
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ namespace :gitlab do
759759
print "#{project.name_with_namespace.yellow} ... "
760760

761761
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
763763
end
764764

765765
if correct_options.all?
@@ -798,7 +798,7 @@ namespace :gitlab do
798798

799799
Project.find_each(batch_size: 100) do |project|
800800
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)
802802

803803
unless File.exists?(project_hook_file)
804804
puts "missing".red

0 commit comments

Comments
 (0)