aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2015-09-25 14:37:50 +0100
committerMike McQuaid2015-09-25 16:53:34 +0100
commitbe45e6a0c52b02508aef17f0a9b16ebf6976d006 (patch)
tree5bb26a0370764184af2130fdbebc8dd92dd5c351
parentd0cfad03ddbd289536716c865097e0a6cff132ae (diff)
downloadbrew-be45e6a0c52b02508aef17f0a9b16ebf6976d006.tar.bz2
migrator: link Cellar and opt before the keg.
When there's absolute symlinks in a linked directory in the `keg` (e.g. `bin`)that point to the `Cellar` or `opt` then linking the `keg` will fail before the `Cellar` or `opt` has been linked. Closes Homebrew/homebrew#44306. Closes Homebrew/homebrew#44329. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
-rw-r--r--Library/Homebrew/migrator.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/migrator.rb b/Library/Homebrew/migrator.rb
index 1ef554a39..3418073d0 100644
--- a/Library/Homebrew/migrator.rb
+++ b/Library/Homebrew/migrator.rb
@@ -163,9 +163,9 @@ class Migrator
unlink_oldname
move_to_new_directory
repin
- link_newname unless old_linked_keg.nil?
- link_oldname_opt
link_oldname_cellar
+ link_oldname_opt
+ link_newname unless old_linked_keg.nil?
update_tabs
rescue Interrupt
ignore_interrupts { backup_oldname }