lib/vagrant/data_store.rb
# Commits any changes to the data to disk. Even if the data
# hasn't changed, it will be reserialized and written to disk.
Commits any changes to the data to disk. Even if the data
hasn't changed, it will be reserialized and written to disk.
Commits any changes to the data to disk . Even if the data hasn ' t changed it will be reserialized and written to disk .
def commit
      return if !file_path
      clean_nil_and_empties
      if empty?
        File.delete(file_path) if File.file?(file_path)
      else
        File.open(file_path, "w") { |f| f.write(to_json) }
      end
    end
def commit return if ! file_path clean_nil_and_empties if empty? File . delete ( file_path ) if File . file? ( file_path ) else File . open ( file_path , "w" ) { | f | f . write ( to_json ) } end end
Commits any changes to the data to disk.
Commits any changes to the data to disk .
# Delete the file since an empty data store is not useful