Merge pull request #3111 from alyssais/migrate_empty_homebrew_directory

Don't fail to migrate repo because of empty dir
This commit is contained in:
Mike McQuaid 2017-08-31 19:14:37 +01:00 committed by GitHub
commit 35de091bae

View File

@ -203,6 +203,7 @@ module Homebrew
end end
new_homebrew_repository = Pathname.new "/usr/local/Homebrew" new_homebrew_repository = Pathname.new "/usr/local/Homebrew"
new_homebrew_repository.rmdir_if_possible
if new_homebrew_repository.exist? if new_homebrew_repository.exist?
ofail <<-EOS.undent ofail <<-EOS.undent
#{new_homebrew_repository} already exists. #{new_homebrew_repository} already exists.