uninstall: better message when dependents remain

Suggested by @MikeMcQuaid
This commit is contained in:
Alyssa Ross 2016-09-27 21:56:06 +01:00
parent 6f0aabe707
commit e41c4e5029

View File

@ -21,7 +21,7 @@ module Homebrew
dependants_output = dependants.map { |k| "#{k.name} #{k.version}" }.join(", ") dependants_output = dependants.map { |k| "#{k.name} #{k.version}" }.join(", ")
conjugation = dependants.count == 1 ? "is" : "are" conjugation = dependants.count == 1 ? "is" : "are"
ofail "Refusing to uninstall #{keg} because it is required by #{dependants_output}, which #{conjugation} currently installed." ofail "Refusing to uninstall #{keg} because it is required by #{dependants_output}, which #{conjugation} currently installed."
puts "Remove it anyway with `brew uninstall --force #{keg.name}`." puts "You can override this and force removal with `brew uninstall --force #{keg.name}`."
next next
end end