Skip to content

Commit 10e2c2b

Browse files
committed
extend/pathname: accept String as target in write_env_script
There is too much existing usage outside of Homebrew for us to break [1]. [1]: https://github.com/search?q=%22write_env_script%20%5C%22%22%20NOT%20org%3AHomebrew%20NOT%20is%3Afork&type=code Closes Homebrew/homebrew-core#232573.
1 parent fdabcaf commit 10e2c2b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Library/Homebrew/extend/pathname.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ def write_exec_script(*targets)
290290

291291
# Writes an exec script that sets environment variables.
292292
sig {
293-
params(target: Pathname,
293+
params(target: T.any(Pathname, String),
294294
args_or_env: T.any(String, T::Array[String], T::Hash[String, String], T::Hash[Symbol, String]),
295295
env: T.any(T::Hash[String, String], T::Hash[Symbol, String])).void
296296
}

0 commit comments

Comments
 (0)