Commit 428af5ea62ef89dc5e2c2bddb6c910df24dace79
Exists in
master
and in
4 other branches
Merge pull request #2890 from cameronyule/support_osx_groups
OS X support for gitlab:check rake tasks
Showing
1 changed file
with
1 additions
and
2 deletions
Show diff stats
lib/tasks/gitlab/task_helpers.rake
@@ -77,8 +77,7 @@ namespace :gitlab do | @@ -77,8 +77,7 @@ namespace :gitlab do | ||
77 | end | 77 | end |
78 | 78 | ||
79 | def gid_for(group_name) | 79 | def gid_for(group_name) |
80 | - group_line = File.read("/etc/group").lines.select{|l| l.start_with?("#{group_name}:")}.first | ||
81 | - group_line.split(":")[2].to_i | 80 | + Etc.getgrnam(group_name).gid |
82 | end | 81 | end |
83 | 82 | ||
84 | def warn_user_is_not_gitlab | 83 | def warn_user_is_not_gitlab |