Skip to content

Commit 1ae13e0

Browse files
committed
Formula-Cookbook: Recommend the in-use write_exec_script syntax
- The `bin.write_exec_script Dir[libexec/"bin/*"]` is used in core formulae, whereas the previously recommended syntax is not found at all. Let's make reality match the documentation. - Part of https://github.com/orgs/Homebrew/projects/5?pane=issue&itemId=97021840.
1 parent aecd2b3 commit 1ae13e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/Formula-Cookbook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1025,7 +1025,7 @@ end
10251025
* 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):
10261026

10271027
```ruby
1028-
bin.write_exec_script (libexec/"bin").children
1028+
bin.write_exec_script Dir[libexec/"bin/*"]
10291029
bin.write_exec_script prefix/"Package.app/Contents/MacOS/package"
10301030
bin.write_jar_script libexec/jar_file, "jarfile", java_version: "11"
10311031
```

0 commit comments

Comments
 (0)