call unlink before removing the castle repo
This commit is contained in:
@@ -233,18 +233,9 @@ class Homesick < Thor
|
|||||||
check_castle_existance name, "destroy"
|
check_castle_existance name, "destroy"
|
||||||
|
|
||||||
if shell.yes?("This will destroy your castle irreversible! Are you sure?")
|
if shell.yes?("This will destroy your castle irreversible! Are you sure?")
|
||||||
inside castle_dir(name) do
|
unlink(name)
|
||||||
files = Pathname.glob('{.*,*}').reject{|a| [".",".."].include?(a.to_s)}
|
|
||||||
files.each do |path|
|
|
||||||
|
|
||||||
inside home_dir do
|
|
||||||
adjusted_path = (home_dir + path).basename
|
|
||||||
rm adjusted_path
|
|
||||||
end
|
|
||||||
end
|
|
||||||
rm_r castle_dir(name)
|
rm_r castle_dir(name)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user