Skip to content

Commit 76ddcc8

Browse files
(PUP-10997) ignore empty lines in /etc/group
1 parent 9026ec7 commit 76ddcc8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/provider/user/useradd.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def localgroups
135135

136136
Puppet::FileSystem.each_line(group_file) do |line|
137137
data = line.chomp.split(':')
138-
if data.last.split(',').include?(user)
138+
if !data.empty? && data.last.split(',').include?(user)
139139
@groups_of[user] << data.first
140140
end
141141
end

0 commit comments

Comments
 (0)