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 a45d4f1 + 1c33e9c commit 5b81c26Copy full SHA for 5b81c26
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