lib/wright/provider/file.rb in wright-0.4.3 vs lib/wright/provider/file.rb in wright-0.4.4
- old
+ new
@@ -73,9 +73,10 @@
Digest::SHA256.hexdigest(content)
end
def content_uptodate?
return false unless ::File.exist?(filename_expanded)
+ return true unless content
target_content = content || ''
target_checksum = checksum(target_content.to_s)
current_checksum = checksum(::File.read(filename_expanded))
current_checksum == target_checksum
end