reinstall: fail if pinned

This commit is contained in:
Vlad Shablinsky 2016-09-05 22:40:08 +03:00 committed by Uladzislau Shablinski
parent a04030a6f7
commit f8ea7a4a0c

View File

@ -8,7 +8,13 @@ module Homebrew
def reinstall
FormulaInstaller.prevent_build_flags unless DevelopmentTools.installed?
ARGV.resolved_formulae.each { |f| reinstall_formula(f) }
ARGV.resolved_formulae.each do |f|
if f.pinned?
onoe "#{f.full_name} is pinned. You must unpin it to reinstall."
next
end
reinstall_formula(f)
end
end
def reinstall_formula(f)