Fix check.rake to use the new user and group settings
This commit is contained in:
parent
76329a46a3
commit
8f9dec2883
2 changed files with 28 additions and 19 deletions
|
@ -56,12 +56,13 @@ namespace :gitlab do
|
|||
|
||||
def warn_user_is_not_gitlab
|
||||
unless @warned_user_not_gitlab
|
||||
gitlab_user = Gitlab.config.gitlab.user
|
||||
current_user = run("whoami").chomp
|
||||
unless current_user == "gitlab"
|
||||
unless current_user == gitlab_user
|
||||
puts "#{Colored.color(:black)+Colored.color(:on_yellow)} Warning #{Colored.extra(:clear)}"
|
||||
puts " You are running as user #{current_user.magenta}, we hope you know what you are doing."
|
||||
puts " Things may work\/fail for the wrong reasons."
|
||||
puts " For correct results you should run this as user #{"gitlab".magenta}."
|
||||
puts " For correct results you should run this as user #{gitlab_user.magenta}."
|
||||
puts ""
|
||||
end
|
||||
@warned_user_not_gitlab = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue