Merge pull request #14570 from s4nji/patch-1
Update documentation for `brew install` and FAQ regarding `HOMEBREW_NO_INSTALL_FROM_API`
This commit is contained in:
commit
cedd4d33e4
@ -78,6 +78,19 @@ module Homebrew
|
|||||||
end.presence
|
end.presence
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if Homebrew::EnvConfig.automatically_set_no_install_from_api? &&
|
||||||
|
!Homebrew::EnvConfig.no_env_hints?
|
||||||
|
paths.each do |path|
|
||||||
|
next if !path.fnmatch?("**/homebrew-core/Formula/*.rb") && !path.fnmatch?("**/homebrew-cask/Casks/*.rb")
|
||||||
|
|
||||||
|
opoo <<~EOS
|
||||||
|
Unless `HOMEBREW_NO_INSTALL_FROM_API` is set when running
|
||||||
|
`brew install`, it will ignore your locally edited formula.
|
||||||
|
EOS
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if args.print_path?
|
if args.print_path?
|
||||||
paths.each(&method(:puts))
|
paths.each(&method(:puts))
|
||||||
return
|
return
|
||||||
|
@ -13,7 +13,7 @@ describe "brew edit" do
|
|||||||
|
|
||||||
setup_test_formula "testball"
|
setup_test_formula "testball"
|
||||||
|
|
||||||
expect { brew "edit", "testball", "HOMEBREW_EDITOR" => "/bin/cat" }
|
expect { brew "edit", "testball", "HOMEBREW_EDITOR" => "/bin/cat", "HOMEBREW_NO_ENV_HINTS" => "1" }
|
||||||
.to output(/# something here/).to_stdout
|
.to output(/# something here/).to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
.and be_a_success
|
.and be_a_success
|
||||||
|
@ -142,6 +142,8 @@ If all maintainer feedback has been addressed and all tests are passing, bump it
|
|||||||
|
|
||||||
Yes! It’s easy! Just `brew edit <formula>`. You don’t have to submit modifications back to `homebrew/core`, just edit the formula to what you personally need and `brew install <formula>`. As a bonus, `brew update` will merge your changes with upstream so you can still keep the formula up-to-date **with** your personal modifications!
|
Yes! It’s easy! Just `brew edit <formula>`. You don’t have to submit modifications back to `homebrew/core`, just edit the formula to what you personally need and `brew install <formula>`. As a bonus, `brew update` will merge your changes with upstream so you can still keep the formula up-to-date **with** your personal modifications!
|
||||||
|
|
||||||
|
Note that if you are editing a core formula or cask you must set `HOMEBREW_NO_INSTALL_WITH_API=1` before using `brew install` or `brew update` otherwise they will ignore your local changes and default to the API.
|
||||||
|
|
||||||
## Can I make new formulae?
|
## Can I make new formulae?
|
||||||
|
|
||||||
Yes! It’s easy! Just `brew create URL`. Homebrew will then open the formula in `EDITOR` so you can edit it, but it probably already installs; try it: `brew install <formula>`. If you encounter any issues, run the command with the `--debug` switch like so: `brew install --debug <formula>`, which drops you into a debugging shell.
|
Yes! It’s easy! Just `brew create URL`. Homebrew will then open the formula in `EDITOR` so you can edit it, but it probably already installs; try it: `brew install <formula>`. If you encounter any issues, run the command with the `--debug` switch like so: `brew install --debug <formula>`, which drops you into a debugging shell.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user