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.
2 parents fb7ae21 + d2e0c53 commit 1c33e9cCopy full SHA for 1c33e9c
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