Revert "core: better cleanup of ".vagrant"" [GH-2201]
This reverts commit 5b42994406
.
This commit is contained in:
parent
1a780bf5b2
commit
d95567e4c7
|
@ -180,18 +180,12 @@ module Vagrant
|
||||||
# If this isn't a directory then it isn't a provider
|
# If this isn't a directory then it isn't a provider
|
||||||
next if !provider_folder.directory?
|
next if !provider_folder.directory?
|
||||||
|
|
||||||
# If this machine doesn't have an ID, then remove the
|
# If this machine doesn't have an ID, then ignore
|
||||||
# directory because it shouldn't exist, and ignore.
|
next if !provider_folder.join("id").file?
|
||||||
if !provider_folder.join("id").file?
|
|
||||||
provider_folder.rmtree
|
|
||||||
next
|
|
||||||
end
|
|
||||||
|
|
||||||
provider = provider_folder.basename.to_s.to_sym
|
provider = provider_folder.basename.to_s.to_sym
|
||||||
result << [name, provider]
|
result << [name, provider]
|
||||||
end
|
end
|
||||||
|
|
||||||
name_folder.rmtree if name_folder.children.empty?
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Return the results
|
# Return the results
|
||||||
|
|
Loading…
Reference in New Issue