class KPM::PluginsManager
def write_plugin_identifiers(identifiers)
def write_plugin_identifiers(identifiers) path = Pathname.new(@plugins_dir).join('plugin_identifiers.json') Dir.mktmpdir do |tmp_dir| tmp_path = Pathname.new(tmp_dir).join('plugin_identifiers.json') File.open(tmp_path, 'w') do |f| f.write(identifiers.to_json) end FileUtils.mv(tmp_path, path) end end