From bc7469c819e18afa07f4c719d895e3c3c80f8c3f Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Tue, 20 Mar 2012 14:27:07 -0500 Subject: [PATCH] Fix inappropriate linking of info files share/info files were always being linked if they existed, regardless of whether the user had HOMEBREW_KEEP_INFO set. This primarily affects users with software built before 9610ff2e9e06931693f49d4377ee26c0e664c547. This also fixes a bug in Keg#link_dir, in which a file would always be linked if no argument was passed. --- Library/Homebrew/keg.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/keg.rb b/Library/Homebrew/keg.rb index 6aca9f6846..78335b2f73 100644 --- a/Library/Homebrew/keg.rb +++ b/Library/Homebrew/keg.rb @@ -75,7 +75,7 @@ class Keg < Pathname link_dir('share') do |path| case path.to_s when 'locale/locale.alias' then :skip_file - when INFOFILE_RX then :info if ENV['HOMEBREW_KEEP_INFO'] + when INFOFILE_RX then ENV['HOMEBREW_KEEP_INFO'] ? :info : :skip_file when LOCALEDIR_RX then :mkpath when *share_mkpaths then :mkpath else :link @@ -146,7 +146,7 @@ protected Find.prune if File.basename(src) == '.DS_Store' case yield src.relative_path_from(root) - when :skip_file + when :skip_file, nil Find.prune when :info make_relative_symlink dst, src