aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorAdam Vandenberg2013-03-03 13:32:28 -0800
committerAdam Vandenberg2013-03-03 13:32:28 -0800
commit8aaa58095a917d8e21a92ea2b042204711e091c5 (patch)
tree3c989939a274c13423db54a4e060c3fd9a563363 /Library
parentc75a7decb7a3a89a28c12c3f2277e1496d3c6775 (diff)
downloadbrew-8aaa58095a917d8e21a92ea2b042204711e091c5.tar.bz2
brew-switch: don't link keg-only brews
Closes Homebrew/homebrew#18169.
Diffstat (limited to 'Library')
-rwxr-xr-xLibrary/Contributions/cmd/brew-switch.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/Library/Contributions/cmd/brew-switch.rb b/Library/Contributions/cmd/brew-switch.rb
index 3b51f941c..9ea122cc3 100755
--- a/Library/Contributions/cmd/brew-switch.rb
+++ b/Library/Contributions/cmd/brew-switch.rb
@@ -34,7 +34,8 @@ cellar.children.select { |pn| pn.directory? }.each do |v|
keg.unlink
end
-# Link new version
-
-keg = Keg.new(cellar+version)
-puts "#{keg.link} links created for #{keg}" \ No newline at end of file
+# Link new version, if not keg-only
+unless f.keg_only?
+ keg = Keg.new(cellar+version)
+ puts "#{keg.link} links created for #{keg}"
+end