Fix crash in gitlab:check while checking hooks

This commit is contained in:
Riyad Preukschas 2012-12-24 16:41:46 +01:00
parent d9ca1bce7a
commit 0e15270b75

View file

@ -645,7 +645,6 @@ namespace :gitlab do
hook_file = "post-receive"
gitolite_hooks_path = File.join(Gitlab.config.gitolite.hooks_path, "common")
gitolite_hook_file = File.join(gitolite_hooks_path, hook_file)
gitolite_hook_content = File.read(gitolite_hook_file)
gitolite_ssh_user = Gitlab.config.gitolite.ssh_user
unless File.exists?(gitolite_hook_file)
@ -653,6 +652,7 @@ namespace :gitlab do
return
end
gitolite_hook_content = File.read(gitolite_hook_file)
gitlab_hook_file = Rails.root.join.join("lib", "hooks", hook_file)
gitlab_hook_content = File.read(gitlab_hook_file)