diff options
| author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-12 17:28:59 +0000 |
|---|---|---|
| committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-09-12 17:28:59 +0000 |
| commit | 6f037b9fe89290333a744d5d2a283b50880e14c0 (patch) | |
| tree | c688365dc4128032ba1916338ff8b6aaf4e145cc | |
| parent | ed72e949f2947e26b8990aac9b8e6f3b836c85b7 (diff) | |
| parent | cb6d7e5192c926b61d8cbdd4f4e0d45813ed7a09 (diff) | |
| download | gitlab-ce-6f037b9fe89290333a744d5d2a283b50880e14c0.tar.gz | |
Merge branch 'argument_error_in_gitlab_check' of /home/git/repositories/gitlab/gitlabhq
| -rw-r--r-- | lib/tasks/gitlab/check.rake | 6 | ||||
| -rw-r--r-- | lib/tasks/gitlab/task_helpers.rake | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/tasks/gitlab/check.rake b/lib/tasks/gitlab/check.rake index 74b3e7787e6..1e9228a3509 100644 --- a/lib/tasks/gitlab/check.rake +++ b/lib/tasks/gitlab/check.rake @@ -479,11 +479,13 @@ namespace :gitlab do return end - if File.stat(repo_base_path).uid == uid_for(gitlab_shell_ssh_user) && - File.stat(repo_base_path).gid == gid_for(gitlab_shell_owner_group) + uid = uid_for(gitlab_shell_ssh_user) + gid = gid_for(gitlab_shell_owner_group) + if File.stat(repo_base_path).uid == uid && File.stat(repo_base_path).gid == gid puts "yes".green else puts "no".red + puts " User id for #{gitlab_shell_ssh_user}: #{uid}. Groupd id for #{gitlab_shell_owner_group}: #{gid}".blue try_fixing_it( "sudo chown -R #{gitlab_shell_ssh_user}:#{gitlab_shell_owner_group} #{repo_base_path}" ) diff --git a/lib/tasks/gitlab/task_helpers.rake b/lib/tasks/gitlab/task_helpers.rake index f84257d15b5..ac2c4577c77 100644 --- a/lib/tasks/gitlab/task_helpers.rake +++ b/lib/tasks/gitlab/task_helpers.rake @@ -80,7 +80,11 @@ namespace :gitlab do end def gid_for(group_name) - Etc.getgrnam(group_name).gid + begin + Etc.getgrnam(group_name).gid + rescue ArgumentError # no group + "group #{group_name} doesn't exist" + end end def warn_user_is_not_gitlab |
