Merge pull request #20363 from Homebrew/formula-cookbook-should-recommend-whats-actually-in-use

Formula-Cookbook: Recommend the in-use `write_exec_script` syntax
This commit is contained in:
Patrick Linnane 2025-08-03 00:50:59 +00:00 committed by GitHub
commit 75aee5ec5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1025,7 +1025,7 @@ end
* To surface one or more binaries buried in `libexec` or a macOS `.app` package, use [`write_exec_script`](https://rubydoc.brew.sh/Pathname#write_exec_script-instance_method) or [`write_jar_script`](https://rubydoc.brew.sh/Pathname#write_jar_script-instance_method):
```ruby
bin.write_exec_script (libexec/"bin").children
bin.write_exec_script Dir[libexec/"bin/*"]
bin.write_exec_script prefix/"Package.app/Contents/MacOS/package"
bin.write_jar_script libexec/jar_file, "jarfile", java_version: "11"
```