Commit 30f8713aa1e35abdd33a90c0a8e691a9b6befbf4
1 parent
c3f088d2
Exists in
spb-stable
and in
3 other branches
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.
Showing
1 changed file
with
4 additions
and
4 deletions
Show diff stats
lib/tasks/gitlab/check.rake
@@ -489,7 +489,7 @@ namespace :gitlab do | @@ -489,7 +489,7 @@ namespace :gitlab do | ||
489 | "sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}" | 489 | "sudo -u #{gitlab_shell_ssh_user} ln -sf #{gitlab_shell_hook_file} #{project_hook_file}" |
490 | ) | 490 | ) |
491 | for_more_information( | 491 | for_more_information( |
492 | - "#{gitlab_shell_user_home}/gitlab-shell/support/rewrite-hooks.sh" | 492 | + "#{gitlab_shell_path}/support/rewrite-hooks.sh" |
493 | ) | 493 | ) |
494 | fix_and_rerun | 494 | fix_and_rerun |
495 | next | 495 | next |
@@ -513,7 +513,7 @@ namespace :gitlab do | @@ -513,7 +513,7 @@ namespace :gitlab do | ||
513 | end | 513 | end |
514 | 514 | ||
515 | def check_gitlab_shell_self_test | 515 | def check_gitlab_shell_self_test |
516 | - gitlab_shell_repo_base = File.expand_path('gitlab-shell', gitlab_shell_user_home) | 516 | + gitlab_shell_repo_base = gitlab_shell_path |
517 | check_cmd = File.expand_path('bin/check', gitlab_shell_repo_base) | 517 | check_cmd = File.expand_path('bin/check', gitlab_shell_repo_base) |
518 | puts "Running #{check_cmd}" | 518 | puts "Running #{check_cmd}" |
519 | if system(check_cmd, chdir: gitlab_shell_repo_base) | 519 | if system(check_cmd, chdir: gitlab_shell_repo_base) |
@@ -559,8 +559,8 @@ namespace :gitlab do | @@ -559,8 +559,8 @@ namespace :gitlab do | ||
559 | # Helper methods | 559 | # Helper methods |
560 | ######################## | 560 | ######################## |
561 | 561 | ||
562 | - def gitlab_shell_user_home | ||
563 | - File.expand_path("~#{Gitlab.config.gitlab_shell.ssh_user}") | 562 | + def gitlab_shell_path |
563 | + Gitlab.config.gitlab_shell.path | ||
564 | end | 564 | end |
565 | 565 | ||
566 | def gitlab_shell_version | 566 | def gitlab_shell_version |