lib/filbunke/client.rb in filbunke-1.2.0 vs lib/filbunke/client.rb in filbunke-1.2.1
- old
+ new
@@ -171,10 +171,14 @@
return false
end
end
def write_file!(file_path, contents)
- @logger.log("Writing: #{file_path}")
+ if ::File.exists?(file_path)
+ @logger.log("Updating: #{file_path}")
+ else
+ @logger.log("Writing: #{file_path}")
+ end
::FileUtils.mkdir_p(::File.dirname(file_path))
::File.open(file_path, 'w') do |file|
file.write(contents);
file.close
end