We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b75918 commit 9fa70aeCopy full SHA for 9fa70ae
lib/puppet/provider/file_line/ruby.rb
@@ -34,7 +34,7 @@ def lines
34
35
def handle_create_with_match()
36
regex = resource[:match] ? Regexp.new(resource[:match]) : nil
37
- match_count = lines.select { |l| regex.match(l) }.count
+ match_count = lines.select { |l| regex.match(l) }.size
38
if match_count > 1
39
raise Puppet::Error, "More than one line in file '#{resource[:path]}' matches pattern '#{resource[:match]}'"
40
end
0 commit comments