From f1191d4b3c21cc0303818a782dad9dec6d84e129 Mon Sep 17 00:00:00 2001 From: Nicolas McCurdy Date: Thu, 16 Jan 2014 02:44:04 -0500 Subject: [PATCH] Remove duplicate methods rm and rm_link --- lib/homesick/actions.rb | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/lib/homesick/actions.rb b/lib/homesick/actions.rb index b079325..5c603f0 100644 --- a/lib/homesick/actions.rb +++ b/lib/homesick/actions.rb @@ -102,22 +102,6 @@ class Homesick end end - def rm_link(target) - target = Pathname.new(target) - - if target.symlink? - say_status :unlink, "#{target.expand_path}", :green unless options[:quiet] - FileUtils.rm_rf target - else - say_status :conflict, "#{target} is not a symlink", :red unless options[:quiet] - end - end - - def rm(file) - say_status "rm #{file}", '', :green unless options[:quiet] - system "rm #{file}" if File.exists?(file) - end - def rm_rf(dir) say_status "rm -rf #{dir}", '', :green unless options[:quiet] system "rm -rf #{dir}" @@ -136,7 +120,7 @@ class Homesick def rm(file) say_status "rm #{file}", '', :green unless options[:quiet] - system "rm #{file}" + system "rm #{file}" if File.exists?(file) end def rm_r(dir)