update-report: handle directory not existing.

This shouldn't be possible to occur after #1013 but it makes sense to
add it anyway.
This commit is contained in:
Mike McQuaid 2016-09-18 16:55:59 +01:00
parent f4a8d28819
commit ee0fb3e999

View File

@ -258,7 +258,7 @@ module Homebrew
dst = Pathname.new("#{HOMEBREW_PREFIX}/bin/brew") dst = Pathname.new("#{HOMEBREW_PREFIX}/bin/brew")
begin begin
FileUtils.ln_s(src.relative_path_from(dst.parent), dst) FileUtils.ln_s(src.relative_path_from(dst.parent), dst)
rescue Errno::EACCES rescue Errno::EACCES, Errno::ENOENT
ofail <<-EOS.undent ofail <<-EOS.undent
Could not create symlink at #{dst}! Could not create symlink at #{dst}!
Please do this manually with: Please do this manually with: