Commit 0e15270b75df9e882bc41e22a6a120092a629a02

Authored by Riyad Preukschas
1 parent d9ca1bce

Fix crash in gitlab:check while checking hooks

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/tasks/gitlab/check.rake
@@ -645,7 +645,6 @@ namespace :gitlab do @@ -645,7 +645,6 @@ namespace :gitlab do
645 hook_file = "post-receive" 645 hook_file = "post-receive"
646 gitolite_hooks_path = File.join(Gitlab.config.gitolite.hooks_path, "common") 646 gitolite_hooks_path = File.join(Gitlab.config.gitolite.hooks_path, "common")
647 gitolite_hook_file = File.join(gitolite_hooks_path, hook_file) 647 gitolite_hook_file = File.join(gitolite_hooks_path, hook_file)
648 - gitolite_hook_content = File.read(gitolite_hook_file)  
649 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user 648 gitolite_ssh_user = Gitlab.config.gitolite.ssh_user
650 649
651 unless File.exists?(gitolite_hook_file) 650 unless File.exists?(gitolite_hook_file)
@@ -653,6 +652,7 @@ namespace :gitlab do @@ -653,6 +652,7 @@ namespace :gitlab do
653 return 652 return
654 end 653 end
655 654
  655 + gitolite_hook_content = File.read(gitolite_hook_file)
656 gitlab_hook_file = Rails.root.join.join("lib", "hooks", hook_file) 656 gitlab_hook_file = Rails.root.join.join("lib", "hooks", hook_file)
657 gitlab_hook_content = File.read(gitlab_hook_file) 657 gitlab_hook_content = File.read(gitlab_hook_file)
658 658