Skip to content

Commit 294e6e8

Browse files
committed
correcting match_for_absence behavior
1 parent 2339ea8 commit 294e6e8

File tree

1 file changed

+1
-1
lines changed
  • lib/puppet/provider/file_line

1 file changed

+1
-1
lines changed

lib/puppet/provider/file_line/ruby.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def exists?
1414
match_count = count_matches(new_match_regex)
1515
if resource[:append_on_no_match].to_s == 'false'
1616
found = true
17-
elsif resource[:replace].to_s == 'true'
17+
elsif resource[:replace].to_s == 'true' && resource[:match_for_absence].to_s != 'true'
1818
found = lines_count > 0 && lines_count == match_count
1919
else
2020
found = match_count > 0

0 commit comments

Comments
 (0)