diff --git a/Library/Homebrew/development_tools.rb b/Library/Homebrew/development_tools.rb index 3ad70e3e93..90254d2715 100644 --- a/Library/Homebrew/development_tools.rb +++ b/Library/Homebrew/development_tools.rb @@ -6,7 +6,7 @@ require "version" # @private class DevelopmentTools class << self - sig { params(tool: String).returns(T.nilable(Pathname)) } + sig { params(tool: T.any(String, Symbol)).returns(T.nilable(Pathname)) } def locate(tool) # Don't call tools (cc, make, strip, etc.) directly! # Give the name of the binary you look for as a string to this method diff --git a/Library/Homebrew/extend/os/linux/development_tools.rb b/Library/Homebrew/extend/os/linux/development_tools.rb index d26b73f312..c9d04a4830 100644 --- a/Library/Homebrew/extend/os/linux/development_tools.rb +++ b/Library/Homebrew/extend/os/linux/development_tools.rb @@ -3,7 +3,7 @@ class DevelopmentTools class << self - sig { params(tool: String).returns(T.nilable(Pathname)) } + sig { params(tool: T.any(String, Symbol)).returns(T.nilable(Pathname)) } def locate(tool) (@locate ||= {}).fetch(tool) do |key| @locate[key] = if needs_build_formulae? && diff --git a/Library/Homebrew/extend/os/mac/development_tools.rb b/Library/Homebrew/extend/os/mac/development_tools.rb index 0df45d805d..d86403c7d6 100644 --- a/Library/Homebrew/extend/os/mac/development_tools.rb +++ b/Library/Homebrew/extend/os/mac/development_tools.rb @@ -10,7 +10,7 @@ class DevelopmentTools undef installed?, default_compiler, curl_handles_most_https_certificates?, subversion_handles_most_https_certificates? - sig { params(tool: String).returns(T.nilable(Pathname)) } + sig { params(tool: T.any(String, Symbol)).returns(T.nilable(Pathname)) } def locate(tool) (@locate ||= {}).fetch(tool) do |key| @locate[key] = if (located_tool = generic_locate(tool))