aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula_installer.rb
diff options
context:
space:
mode:
authorMike McQuaid2018-01-10 16:43:21 +0000
committerMike McQuaid2018-01-10 16:43:21 +0000
commit838a3f199673439b6e98a6a3de024f80ec41f09d (patch)
tree60bb48fef6021abb6fd7ae1a4dd94914218eedc0 /Library/Homebrew/formula_installer.rb
parentb66010605dfb8ecd7e5eb9eb5d1b97462c259e4d (diff)
downloadbrew-838a3f199673439b6e98a6a3de024f80ec41f09d.tar.bz2
reinstall/upgrade: stop unlinked kegs being sticky
It's not possible to determine the difference between a non-keg-only keg that failed to link and one that wasn't linked by us intentionally. To avoid additional complexity of storing this logic in another place let's back out this relatively new functionality; sticky keg-only links is a better and more desirable behaviour anyway.
Diffstat (limited to 'Library/Homebrew/formula_installer.rb')
-rw-r--r--Library/Homebrew/formula_installer.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/Library/Homebrew/formula_installer.rb b/Library/Homebrew/formula_installer.rb
index 48109310e..4f8708a4d 100644
--- a/Library/Homebrew/formula_installer.rb
+++ b/Library/Homebrew/formula_installer.rb
@@ -32,11 +32,11 @@ class FormulaInstaller
attr_reader :formula
attr_accessor :options, :build_bottle, :invalid_option_names
- attr_accessor :installed_as_dependency, :installed_on_request
+ attr_accessor :installed_as_dependency, :installed_on_request, :link_keg
mode_attr_accessor :show_summary_heading, :show_header
mode_attr_accessor :build_from_source, :force_bottle
mode_attr_accessor :ignore_deps, :only_deps, :interactive, :git
- mode_attr_accessor :verbose, :debug, :quieter, :link_keg
+ mode_attr_accessor :verbose, :debug, :quieter
def initialize(formula)
@formula = formula
@@ -562,7 +562,7 @@ class FormulaInstaller
fi.verbose = verbose?
fi.quieter = quieter?
fi.debug = debug?
- fi.link_keg = keg_was_linked if keg_had_linked_keg
+ fi.link_keg ||= keg_was_linked if keg_had_linked_keg
fi.installed_as_dependency = true
fi.installed_on_request = df.any_version_installed? && tab.installed_on_request
fi.prelude