update-report: create top-level directories later.

Otherwise if they are created and empty they may be removed again
before we try to create the `/usr/local/bin/brew` symlink.
This commit is contained in:
Mike McQuaid 2016-09-18 16:06:49 +01:00
parent e20467971e
commit 89ebffadec

View File

@ -191,10 +191,6 @@ module Homebrew
return return
end end
Keg::ALL_TOP_LEVEL_DIRECTORIES.each do |dir|
FileUtils.mkdir_p "#{HOMEBREW_PREFIX}/#{dir}"
end
new_homebrew_repository = Pathname.new "/usr/local/Homebrew" new_homebrew_repository = Pathname.new "/usr/local/Homebrew"
if new_homebrew_repository.exist? if new_homebrew_repository.exist?
ofail <<-EOS.undent ofail <<-EOS.undent
@ -254,6 +250,10 @@ module Homebrew
EOS EOS
end end
Keg::ALL_TOP_LEVEL_DIRECTORIES.each do |dir|
FileUtils.mkdir_p "#{HOMEBREW_PREFIX}/#{dir}"
end
src = Pathname.new("#{new_homebrew_repository}/bin/brew") src = Pathname.new("#{new_homebrew_repository}/bin/brew")
dst = Pathname.new("#{HOMEBREW_PREFIX}/bin/brew") dst = Pathname.new("#{HOMEBREW_PREFIX}/bin/brew")
begin begin