summaryrefslogtreecommitdiff
path: root/lib/backup/repository.rb
diff options
context:
space:
mode:
authorJacob Vosmaer <contact@jacobvosmaer.nl>2014-02-26 17:32:52 +0100
committerJacob Vosmaer <contact@jacobvosmaer.nl>2014-02-26 17:32:52 +0100
commit91c70c5b1c60160253520a5ac6ac3eec46faf416 (patch)
treef4eaf29cf50a38e5367d83a3b49a661f7ad13ce0 /lib/backup/repository.rb
parent5d6e4bd2d8d2e45407bb437e5b22656cffedc15a (diff)
downloadgitlab-ce-91c70c5b1c60160253520a5ac6ac3eec46faf416.tar.gz
Use gitlab_shell.path to invoke rewrite-hooks.sh
The backup restore code for repositories was assuming that gitlab-shell is installed in /home/git/gitlab-shell. This commit changes that to use the configuration setting from gitlab.yml that specifies the path where gitlab-shell is installed.
Diffstat (limited to 'lib/backup/repository.rb')
-rw-r--r--lib/backup/repository.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/backup/repository.rb b/lib/backup/repository.rb
index 20fd5ba92a1..552f7eaa5ce 100644
--- a/lib/backup/repository.rb
+++ b/lib/backup/repository.rb
@@ -72,8 +72,7 @@ module Backup
end
print 'Put GitLab hooks in repositories dirs'.yellow
- gitlab_shell_user_home = File.expand_path("~#{Gitlab.config.gitlab_shell.ssh_user}")
- if system("#{gitlab_shell_user_home}/gitlab-shell/support/rewrite-hooks.sh", Gitlab.config.gitlab_shell.repos_path)
+ if system("#{Gitlab.config.gitlab_shell.path}/support/rewrite-hooks.sh", Gitlab.config.gitlab_shell.repos_path)
puts " [DONE]".green
else
puts " [FAILED]".red