diff --git a/Library/Homebrew/cmd/reinstall.rb b/Library/Homebrew/cmd/reinstall.rb index e98e906f6a..e51aace2ad 100644 --- a/Library/Homebrew/cmd/reinstall.rb +++ b/Library/Homebrew/cmd/reinstall.rb @@ -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)