diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-24 19:58:09 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-29 11:14:41 +0300 |
commit | 6a56bec735c7434c85e3b8776b8413d3bdcb93ec (patch) | |
tree | 8a8152101a267bc500cec84c6343546fe7143ab5 | |
parent | 48389b4e5ec251441d1b1e135fdb28fe742289d8 (diff) | |
download | gitlab-ce-6a56bec735c7434c85e3b8776b8413d3bdcb93ec.tar.gz |
replace `is_gitlab_user?` with `gitlab_user?`
-rw-r--r-- | lib/system_check/app/git_config_check.rb | 2 | ||||
-rw-r--r-- | lib/tasks/gitlab/task_helpers.rb | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/system_check/app/git_config_check.rb b/lib/system_check/app/git_config_check.rb index 198867f7ac6..d08a81639e3 100644 --- a/lib/system_check/app/git_config_check.rb +++ b/lib/system_check/app/git_config_check.rb @@ -20,7 +20,7 @@ module SystemCheck # Returns true if all subcommands were successful (according to their exit code) # Returns false if any or all subcommands failed. def repair! - return false unless is_gitlab_user? + return false unless gitlab_user? command_success = OPTIONS.map do |name, value| system(*%W(#{Gitlab.config.git.bin_path} config --global #{name} #{value})) diff --git a/lib/tasks/gitlab/task_helpers.rb b/lib/tasks/gitlab/task_helpers.rb index d85b810ac66..8a63f486fa3 100644 --- a/lib/tasks/gitlab/task_helpers.rb +++ b/lib/tasks/gitlab/task_helpers.rb @@ -104,7 +104,7 @@ module Gitlab Gitlab.config.gitlab.user end - def is_gitlab_user? + def gitlab_user? return @is_gitlab_user unless @is_gitlab_user.nil? current_user = run_command(%w(whoami)).chomp @@ -114,7 +114,7 @@ module Gitlab def warn_user_is_not_gitlab return if @warned_user_not_gitlab - unless is_gitlab_user? + unless gitlab_user? current_user = run_command(%w(whoami)).chomp puts " Warning ".color(:black).background(:yellow) |