Print given argument instead of rename if matching keg not found
This commit is contained in:
parent
3ab140e397
commit
9b611be759
@ -316,7 +316,7 @@ module Homebrew
|
||||
rack = Formulary.to_rack(name.downcase)
|
||||
|
||||
kegs = rack.directory? ? rack.subdirs.map { |d| Keg.new(d) } : []
|
||||
raise NoSuchKegError, rack.basename if kegs.none?
|
||||
raise NoSuchKegError, name if kegs.none?
|
||||
|
||||
[rack, kegs]
|
||||
end
|
||||
|
||||
@ -29,7 +29,7 @@ module Homebrew
|
||||
def migrate
|
||||
args = migrate_args.parse
|
||||
|
||||
args.named.to_default_kegs.each do |keg|
|
||||
args.named.to_kegs.each do |keg|
|
||||
f = Formulary.from_keg(keg)
|
||||
|
||||
if f.oldname
|
||||
|
||||
@ -36,7 +36,7 @@ module Homebrew
|
||||
f = Formulary.from_rack(rack)
|
||||
if f.pinned?
|
||||
onoe "#{f.full_name} is pinned. You must unpin it to uninstall."
|
||||
next
|
||||
break # exit keg loop and move on to next rack
|
||||
end
|
||||
rescue
|
||||
nil
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user