mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

This uses the logic in `brew.sh` for deciding whether or not to run `brew update --auto-update` and makes it a dedicated command that can be used instead of `brew update` in scripts to be really fast in the no-op case. `brew update` will always do at least some updating which is a nicer default but is much slower.
7 lines
162 B
Bash
7 lines
162 B
Bash
# Documentation defined in Library/Homebrew/cmd/update-if-needed.rb
|
|
|
|
homebrew-update-if-needed() {
|
|
export HOMEBREW_AUTO_UPDATE_COMMAND="1"
|
|
auto-update "$@"
|
|
}
|