Update docs/Formula-Cookbook.md
Co-authored-by: Rylan Polster <rslpolster@gmail.com>
This commit is contained in:
parent
665b86453f
commit
2487324214
@ -752,7 +752,7 @@ The symlinks created by [`install_symlink`](https://rubydoc.brew.sh/Pathname#ins
|
||||
|
||||
### Rewriting a script shebang
|
||||
|
||||
Some formulae install executable scripts written in an interpreted language such as Python or Perl. Homebrew provides a `rewrite_shebang` method to rewrite the shebang of a script. This replaces a script's original interpreter path with the one the formula depends on. This guarantees that the correct interpreter is used at execution time. It is only needed when the build system doesn't already do it (e.g., often when using `pip` or Perl `ExtUtils::MakeMaker`).
|
||||
Some formulae install executable scripts written in an interpreted language such as Python or Perl. Homebrew provides a `rewrite_shebang` method to rewrite the shebang of a script. This replaces a script's original interpreter path with the one the formula depends on. This guarantees that the correct interpreter is used at execution time. This isn't required if the build system already handles it (e.g. often with `pip` or Perl `ExtUtils::MakeMaker`).
|
||||
|
||||
For example, the [`icdiff` formula](https://github.com/Homebrew/homebrew-core/blob/7beae5ab57c65249403699b2b0700fbccf14e6cb/Formula/icdiff.rb#L16) uses such utility. Note that it is necessary to include the utility in the formula, for example with Python one must use `include Language::Python::Shebang`.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user