Simplify Tap#custom_remote?.

This commit is contained in:
Markus Reiter 2024-02-23 15:05:37 +01:00
parent d7d4c82662
commit abc591e702
No known key found for this signature in database
GPG Key ID: 245293B51702655B

View File

@ -523,10 +523,11 @@ class Tap
end end
# True if the {#remote} of {Tap} is customized. # True if the {#remote} of {Tap} is customized.
sig { returns(T::Boolean) }
def custom_remote? def custom_remote?
return true unless remote return true unless (remote = self.remote)
remote.casecmp(default_remote).nonzero? !remote.casecmp(default_remote).zero?
end end
# Path to the directory of all {Formula} files for this {Tap}. # Path to the directory of all {Formula} files for this {Tap}.