lib/puppet/provider/augeas/augeas.rb in puppet-2.7.13 vs lib/puppet/provider/augeas/augeas.rb in puppet-2.7.14
- old
+ new
@@ -295,11 +295,11 @@
fail("Save failed with return code #{save_result}") unless save_result
saved_files = @aug.match("/augeas/events/saved")
if saved_files.size > 0
root = resource[:root].sub(/^\/$/, "")
- saved_files.each do |key|
- saved_file = @aug.get(key).sub(/^\/files/, root)
+ saved_files.map! {|key| @aug.get(key).sub(/^\/files/, root) }
+ saved_files.uniq.each do |saved_file|
if Puppet[:show_diff]
notice "\n" + diff(saved_file, saved_file + ".augnew")
end
File.delete(saved_file + ".augnew")
end