From 58b17a0cfc34adf2213e18b1f277c52a89407e64 Mon Sep 17 00:00:00 2001 From: Zhiming Wang <zmwangx@gmail.com> Date: Sat, 17 Sep 2016 23:55:28 -0400 Subject: [PATCH] utils: convert formula name from pathname to string `name` is passed as argument to Formulary.factory which could later be downcased at formulary.rb:349, but Pathname doesn't have a downcase method. Converting `name` to String as it should be fixes the problem. Fixes #1000. --- Library/Homebrew/utils.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 449e903514..755a8a1d6a 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -627,7 +627,7 @@ def migrate_legacy_keg_symlinks_if_necessary HOMEBREW_LINKED_KEGS.mkpath unless legacy_linked_kegs.children.empty? legacy_linked_kegs.children.each do |link| - name = link.basename + name = link.basename.to_s src = begin link.realpath rescue Errno::ENOENT @@ -648,7 +648,7 @@ def migrate_legacy_keg_symlinks_if_necessary HOMEBREW_PINNED_KEGS.mkpath unless legacy_pinned_kegs.children.empty? legacy_pinned_kegs.children.each do |link| - name = link.basename + name = link.basename.to_s src = link.realpath dst = HOMEBREW_PINNED_KEGS/name FileUtils.ln_sf(src.relative_path_from(dst.parent), dst) -- GitLab