Merge pull request #20365 from Homebrew/pathname-type

pathname: add type to `write_exec_script`
This commit is contained in:
Ruoyu Zhong 2025-08-03 09:37:05 +00:00 committed by GitHub
commit 65d3c6e950
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -271,7 +271,7 @@ class Pathname
end
# Writes an exec script in this folder for each target pathname.
sig { params(targets: T::Array[Pathname]).void }
sig { params(targets: T.any(T::Array[T.any(String, Pathname)], String, Pathname)).void }
def write_exec_script(*targets)
targets.flatten!
if targets.empty?