replace is_gitlab_user? with gitlab_user?

This commit is contained in:
Maxim Rydkin 2017-08-24 19:58:09 +03:00
parent 48389b4e5e
commit 6a56bec735
2 changed files with 3 additions and 3 deletions

View file

@ -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}))

View file

@ -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)