Actually remove FromDefaultNameLoader.

This commit is contained in:
Markus Reiter 2024-03-12 22:50:13 +01:00
parent 3e90036cec
commit e575671477
No known key found for this signature in database
GPG Key ID: 245293B51702655B

View File

@ -436,23 +436,6 @@ module Cask
end end
end end
# Loader which tries loading casks from the default tap.
class FromDefaultNameLoader < FromTapLoader
sig {
params(ref: T.any(String, Pathname, Cask, URI::Generic), warn: T::Boolean)
.returns(T.nilable(T.attached_class))
}
def self.try_new(ref, warn: false)
return unless ref.is_a?(String)
return unless (token = ref[HOMEBREW_DEFAULT_TAP_CASK_REGEX, :token])
return unless (tap = CoreCaskTap.instance).installed?
return unless (loader = super("#{tap}/#{token}", warn:))
loader if loader.path.exist?
end
end
# Loader which tries loading casks from tap paths, failing # Loader which tries loading casks from tap paths, failing
# if the same token exists in multiple taps. # if the same token exists in multiple taps.
class FromNameLoader < FromTapLoader class FromNameLoader < FromTapLoader