diff options
| author | Alyssa Ross | 2017-08-31 12:17:01 +0100 |
|---|---|---|
| committer | Alyssa Ross | 2017-08-31 12:17:01 +0100 |
| commit | a6fa2f367bc4c7c6250d875b117de3ef6815a4b4 (patch) | |
| tree | 347bbafce787b88d80f96813e59e8ed88b1f142b | |
| parent | e1bab7ede9461a6d5c93fb7240ba5a1f3bf7a7fb (diff) | |
| download | brew-a6fa2f367bc4c7c6250d875b117de3ef6815a4b4.tar.bz2 | |
Don't fail to migrate repo because of empty dir
I just ran into an issue where a colleague's Homebrew couldn't update.
It seems to have been because it failed once just after the new repo
directory was created. Since there was nothing in this directory, there
really isn't any reason for us to fail here, so to avoid this problem in
the future, try to `rmdir` the directory before failing because it already
exists.
| -rw-r--r-- | Library/Homebrew/cmd/update-report.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb index ea915f99c..164413cd1 100644 --- a/Library/Homebrew/cmd/update-report.rb +++ b/Library/Homebrew/cmd/update-report.rb @@ -203,6 +203,7 @@ module Homebrew end new_homebrew_repository = Pathname.new "/usr/local/Homebrew" + new_homebrew_repository.rmdir_if_possible if new_homebrew_repository.exist? ofail <<-EOS.undent #{new_homebrew_repository} already exists. |
