Sha256: aa8917add116083901af7f4574d8acc05f56c6f80ec6f8093eebd5237b28f4dd
Contents?: true
Size: 524 Bytes
Versions: 16
Compression:
Stored size: 524 Bytes
Contents
require 'fileutils' class Uninstaller def initialize(version) @version = version end def uninstall current = get_current_dir vims_dir = get_vims_dir(@version) src_dir = get_src_dir(@version) if File.exists?(current) target = File.readlink(current) if target == vims_dir abort "#{@version} can not be uninstalled; it is currently used." end end FileUtils.rm_rf(src_dir) if File.exists?(src_dir) FileUtils.rm_rf(vims_dir) if File.exists?(vims_dir) end end
Version data entries
16 entries across 16 versions & 1 rubygems