Commit 30f8713a authored by Robert Speicher's avatar Robert Speicher

Respect custom gitlab_shell path in gitlab:gitlab_shell:check task

Prior to this change, if I customized the config value of
`gitlab.gitlab_shell.path`, the check would ignore this value in favor
of `"~<gitlab.gitlab_shell.ssh_user>/gitlab-shell/"` resulting in a
failed check when the configuration was otherwise valid.
parent c3f088d2
...@@ -489,7 +489,7 @@ namespace :gitlab do ...@@ -489,7 +489,7 @@ namespace :gitlab do
"sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}" "sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}"
) )
for_more_information( for_more_information(
"#{gitlab_shell_user_home}/gitlab-shell/support/rewrite-hooks.sh" "#{gitlab_shell_path}/support/rewrite-hooks.sh"
) )
fix_and_rerun fix_and_rerun
next next
...@@ -513,7 +513,7 @@ namespace :gitlab do ...@@ -513,7 +513,7 @@ namespace :gitlab do
end end
def check_gitlab_shell_self_test def check_gitlab_shell_self_test
gitlab_shell_repo_base = File.expand_path('gitlab-shell', gitlab_shell_user_home) gitlab_shell_repo_base = gitlab_shell_path
check_cmd = File.expand_path('bin/check', gitlab_shell_repo_base) check_cmd = File.expand_path('bin/check', gitlab_shell_repo_base)
puts "Running #{check_cmd}" puts "Running #{check_cmd}"
if system(check_cmd, chdir: gitlab_shell_repo_base) if system(check_cmd, chdir: gitlab_shell_repo_base)
...@@ -559,8 +559,8 @@ namespace :gitlab do ...@@ -559,8 +559,8 @@ namespace :gitlab do
# Helper methods # Helper methods
######################## ########################
def gitlab_shell_user_home def gitlab_shell_path
File.expand_path("~#{Gitlab.config.gitlab_shell.ssh_user}") Gitlab.config.gitlab_shell.path
end end
def gitlab_shell_version def gitlab_shell_version
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment