Improve updating behaviour
- Rename use of "preinstall" to "auto update". The original "preinstall" naming came from the fact that we used to only auto-update before `brew install` but now that it's many commands: this is more confusing than useful. - Add `HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED` and remove `HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`; the latter is now the default and the prior provides an opt-out for better output, performance and avoiding reading potentially untrusted formulae. - Add `HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS` and don't check formula versions by default for better performance by default. Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com> Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
This commit is contained in:
parent
7384a5ef6f
commit
fb4c9353bb
@ -226,13 +226,13 @@ EOS
|
||||
fi
|
||||
}
|
||||
|
||||
# Let user know we're still updating Homebrew if brew update --preinstall
|
||||
# Let user know we're still updating Homebrew if brew update --auto-update
|
||||
# exceeds 3 seconds.
|
||||
update-preinstall-timer() {
|
||||
auto-update-timer() {
|
||||
sleep 3
|
||||
# Outputting a command but don't want to run it, hence single quotes.
|
||||
# shellcheck disable=SC2016
|
||||
echo 'Running `brew update --preinstall`...' >&2
|
||||
echo 'Running `brew update --auto-update`...' >&2
|
||||
if [[ -z "${HOMEBREW_NO_ENV_HINTS}" && -z "${HOMEBREW_AUTO_UPDATE_SECS}" ]]
|
||||
then
|
||||
# shellcheck disable=SC2016
|
||||
@ -244,11 +244,11 @@ update-preinstall-timer() {
|
||||
|
||||
# These variables are set from various Homebrew scripts.
|
||||
# shellcheck disable=SC2154
|
||||
update-preinstall() {
|
||||
auto-update() {
|
||||
[[ -z "${HOMEBREW_HELP}" ]] || return
|
||||
[[ -z "${HOMEBREW_NO_AUTO_UPDATE}" ]] || return
|
||||
[[ -z "${HOMEBREW_AUTO_UPDATING}" ]] || return
|
||||
[[ -z "${HOMEBREW_UPDATE_PREINSTALL}" ]] || return
|
||||
[[ -z "${HOMEBREW_UPDATE_AUTO}" ]] || return
|
||||
[[ -z "${HOMEBREW_AUTO_UPDATE_CHECKED}" ]] || return
|
||||
|
||||
# If we've checked for updates, we don't need to check again.
|
||||
@ -280,11 +280,11 @@ update-preinstall() {
|
||||
|
||||
if [[ -z "${HOMEBREW_VERBOSE}" ]]
|
||||
then
|
||||
update-preinstall-timer &
|
||||
auto-update-timer &
|
||||
timer_pid=$!
|
||||
fi
|
||||
|
||||
brew update --preinstall
|
||||
brew update --auto-update
|
||||
|
||||
if [[ -n "${timer_pid}" ]]
|
||||
then
|
||||
@ -842,7 +842,7 @@ then
|
||||
source "${HOMEBREW_BASH_COMMAND}"
|
||||
|
||||
{
|
||||
update-preinstall "$@"
|
||||
auto-update "$@"
|
||||
"homebrew-${HOMEBREW_COMMAND}" "$@"
|
||||
exit $?
|
||||
}
|
||||
@ -856,7 +856,7 @@ else
|
||||
# HOMEBREW_RUBY_PATH set by utils/ruby.sh
|
||||
# shellcheck disable=SC2154
|
||||
{
|
||||
update-preinstall "$@"
|
||||
auto-update "$@"
|
||||
exec "${HOMEBREW_RUBY_PATH}" "${HOMEBREW_RUBY_WARNINGS}" "${RUBY_DISABLE_OPTIONS}" \
|
||||
"${HOMEBREW_LIBRARY}/Homebrew/brew.rb" "$@"
|
||||
}
|
||||
|
@ -16,9 +16,9 @@ module Homebrew
|
||||
|
||||
module_function
|
||||
|
||||
def update_preinstall_header(args:)
|
||||
@update_preinstall_header ||= begin
|
||||
ohai "Auto-updated Homebrew!" if args.preinstall?
|
||||
def auto_update_header(args:)
|
||||
@auto_update_header ||= begin
|
||||
ohai "Auto-updated Homebrew!" if args.auto_update?
|
||||
true
|
||||
end
|
||||
end
|
||||
@ -29,7 +29,7 @@ module Homebrew
|
||||
description <<~EOS
|
||||
The Ruby implementation of `brew update`. Never called manually.
|
||||
EOS
|
||||
switch "--preinstall",
|
||||
switch "--auto-update", "--preinstall",
|
||||
description: "Run in 'auto-update' mode (faster, less output)."
|
||||
switch "-f", "--force",
|
||||
description: "Treat installed and updated formulae as if they are from "\
|
||||
@ -79,7 +79,7 @@ module Homebrew
|
||||
FileUtils.rm_f HOMEBREW_LOCKS/"update"
|
||||
|
||||
update_args = []
|
||||
update_args << "--preinstall" if args.preinstall?
|
||||
update_args << "--auto-update" if args.auto_update?
|
||||
update_args << "--force" if args.force?
|
||||
exec HOMEBREW_BREW_FILE, "update", *update_args
|
||||
end
|
||||
@ -123,7 +123,7 @@ module Homebrew
|
||||
odie "update-report should not be called directly!" if initial_revision.empty? || current_revision.empty?
|
||||
|
||||
if initial_revision != current_revision
|
||||
update_preinstall_header args: args
|
||||
auto_update_header args: args
|
||||
|
||||
updated = true
|
||||
|
||||
@ -150,7 +150,7 @@ module Homebrew
|
||||
updated_taps = []
|
||||
Tap.each do |tap|
|
||||
next unless tap.git?
|
||||
next if (tap.core_tap? || tap == "homebrew/cask") && Homebrew::EnvConfig.install_from_api? && args.preinstall?
|
||||
next if (tap.core_tap? || tap == "homebrew/cask") && Homebrew::EnvConfig.install_from_api? && args.auto_update?
|
||||
|
||||
if ENV["HOMEBREW_MIGRATE_LINUXBREW_FORMULAE"].present? && tap.core_tap? &&
|
||||
Settings.read("linuxbrewmigrated") != "true"
|
||||
@ -182,12 +182,12 @@ module Homebrew
|
||||
end
|
||||
if reporter.updated?
|
||||
updated_taps << tap.name
|
||||
hub.add(reporter, preinstall: args.preinstall?)
|
||||
hub.add(reporter, auto_update: args.auto_update?)
|
||||
end
|
||||
end
|
||||
|
||||
unless updated_taps.empty?
|
||||
update_preinstall_header args: args
|
||||
auto_update_header args: args
|
||||
puts "Updated #{updated_taps.count} #{"tap".pluralize(updated_taps.count)} (#{updated_taps.to_sentence})."
|
||||
updated = true
|
||||
end
|
||||
@ -196,7 +196,12 @@ module Homebrew
|
||||
if hub.empty?
|
||||
puts "No changes to formulae." unless args.quiet?
|
||||
else
|
||||
hub.dump(updated_formula_report: !args.preinstall?) unless args.quiet?
|
||||
if ENV.fetch("HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED", false)
|
||||
opoo "HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED is now the default behaviour, " \
|
||||
"so you can unset it from your environment."
|
||||
end
|
||||
|
||||
hub.dump(updated_formula_report: !args.auto_update?) unless args.quiet?
|
||||
hub.reporters.each(&:migrate_tap_migration)
|
||||
hub.reporters.each { |r| r.migrate_formula_rename(force: args.force?, verbose: args.verbose?) }
|
||||
CacheStoreDatabase.use(:descriptions) do |db|
|
||||
@ -208,7 +213,7 @@ module Homebrew
|
||||
.update_from_report!(hub)
|
||||
end
|
||||
|
||||
if !args.preinstall? && !args.quiet?
|
||||
if !args.auto_update? && !args.quiet?
|
||||
outdated_formulae = Formula.installed.count(&:outdated?)
|
||||
outdated_casks = Cask::Caskroom.casks.count(&:outdated?)
|
||||
update_pronoun = if (outdated_formulae + outdated_casks) == 1
|
||||
@ -234,8 +239,8 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
end
|
||||
puts if args.preinstall?
|
||||
elsif !args.preinstall? && !ENV["HOMEBREW_UPDATE_FAILED"] && !ENV["HOMEBREW_MIGRATE_LINUXBREW_FORMULAE"]
|
||||
puts if args.auto_update?
|
||||
elsif !args.auto_update? && !ENV["HOMEBREW_UPDATE_FAILED"] && !ENV["HOMEBREW_MIGRATE_LINUXBREW_FORMULAE"]
|
||||
puts "Already up-to-date." unless args.quiet?
|
||||
end
|
||||
|
||||
@ -326,7 +331,7 @@ class Reporter
|
||||
raise ReporterRevisionUnsetError, current_revision_var if @current_revision.empty?
|
||||
end
|
||||
|
||||
def report(preinstall: false)
|
||||
def report(auto_update: false)
|
||||
return @report if @report
|
||||
|
||||
@report = Hash.new { |h, k| h[k] = [] }
|
||||
@ -364,8 +369,8 @@ class Reporter
|
||||
when "M"
|
||||
name = tap.formula_file_to_name(src)
|
||||
|
||||
# Skip reporting updated formulae to speed up automatic updates.
|
||||
if preinstall
|
||||
# Skip filtering unchanged formulae versions by default (as it's slow).
|
||||
unless Homebrew::EnvConfig.update_report_version_changed_formulae?
|
||||
@report[:M] << name
|
||||
next
|
||||
end
|
||||
@ -570,9 +575,9 @@ class ReporterHub
|
||||
@hash.fetch(key, [])
|
||||
end
|
||||
|
||||
def add(reporter, preinstall: false)
|
||||
def add(reporter, auto_update: false)
|
||||
@reporters << reporter
|
||||
report = reporter.report(preinstall: preinstall).delete_if { |_k, v| v.empty? }
|
||||
report = reporter.report(auto_update: auto_update).delete_if { |_k, v| v.empty? }
|
||||
@hash.update(report) { |_key, oldval, newval| oldval.concat(newval) }
|
||||
end
|
||||
|
||||
@ -603,7 +608,7 @@ class ReporterHub
|
||||
private
|
||||
|
||||
def dump_formula_report(key, title)
|
||||
only_installed = Homebrew::EnvConfig.update_report_only_installed?
|
||||
only_installed = !Homebrew::EnvConfig.update_report_all_formulae?
|
||||
|
||||
formulae = select_formula(key).sort.map do |name, new_name|
|
||||
# Format list items of renamed formulae
|
||||
|
@ -3,7 +3,7 @@
|
||||
#: Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations.
|
||||
#:
|
||||
#: --merge Use `git merge` to apply updates (rather than `git rebase`).
|
||||
#: --preinstall Run on auto-updates (e.g. before `brew install`). Skips some slower steps.
|
||||
#: --auto-update Run on auto-updates (e.g. before `brew install`). Skips some slower steps.
|
||||
#: -f, --force Always do a slower, full update check (even if unnecessary).
|
||||
#: -q, --quiet Make some output more quiet
|
||||
#: -v, --verbose Print the directories checked and `git` operations performed.
|
||||
@ -337,7 +337,7 @@ homebrew-update() {
|
||||
--merge) HOMEBREW_MERGE=1 ;;
|
||||
--force) HOMEBREW_UPDATE_FORCE=1 ;;
|
||||
--simulate-from-current-branch) HOMEBREW_SIMULATE_FROM_CURRENT_BRANCH=1 ;;
|
||||
--preinstall) export HOMEBREW_UPDATE_PREINSTALL=1 ;;
|
||||
--auto-update) export HOMEBREW_UPDATE_AUTO=1 ;;
|
||||
--*) ;;
|
||||
-*)
|
||||
[[ "${option}" == *v* ]] && HOMEBREW_VERBOSE=1
|
||||
@ -547,7 +547,7 @@ EOS
|
||||
for DIR in "${HOMEBREW_REPOSITORY}" "${HOMEBREW_LIBRARY}"/Taps/*/*
|
||||
do
|
||||
if [[ -n "${HOMEBREW_INSTALL_FROM_API}" ]] &&
|
||||
[[ -n "${HOMEBREW_UPDATE_PREINSTALL}" ]] &&
|
||||
[[ -n "${HOMEBREW_UPDATE_AUTO}" ]] &&
|
||||
[[ "${DIR}" == "${HOMEBREW_CORE_REPOSITORY}" ]]
|
||||
then
|
||||
continue
|
||||
@ -591,7 +591,7 @@ EOS
|
||||
(
|
||||
UPSTREAM_REPOSITORY_URL="$(git config remote.origin.url)"
|
||||
|
||||
# HOMEBREW_UPDATE_FORCE and HOMEBREW_UPDATE_PREINSTALL aren't modified here so ignore subshell warning.
|
||||
# HOMEBREW_UPDATE_FORCE and HOMEBREW_UPDATE_AUTO aren't modified here so ignore subshell warning.
|
||||
# shellcheck disable=SC2030
|
||||
if [[ "${UPSTREAM_REPOSITORY_URL}" == "https://github.com/"* ]]
|
||||
then
|
||||
@ -630,7 +630,7 @@ EOS
|
||||
# Touch FETCH_HEAD to confirm we've checked for an update.
|
||||
[[ -f "${DIR}/.git/FETCH_HEAD" ]] && touch "${DIR}/.git/FETCH_HEAD"
|
||||
[[ -z "${HOMEBREW_UPDATE_FORCE}" ]] && [[ "${UPSTREAM_SHA_HTTP_CODE}" == "304" ]] && exit
|
||||
elif [[ -n "${HOMEBREW_UPDATE_PREINSTALL}" ]]
|
||||
elif [[ -n "${HOMEBREW_UPDATE_AUTO}" ]]
|
||||
then
|
||||
FORCE_AUTO_UPDATE="$(git config homebrew.forceautoupdate 2>/dev/null || echo "false")"
|
||||
if [[ "${FORCE_AUTO_UPDATE}" != "true" ]]
|
||||
@ -650,7 +650,7 @@ EOS
|
||||
local tmp_failure_file="${HOMEBREW_REPOSITORY}/.git/TMP_FETCH_FAILURES"
|
||||
rm -f "${tmp_failure_file}"
|
||||
|
||||
if [[ -n "${HOMEBREW_UPDATE_PREINSTALL}" ]]
|
||||
if [[ -n "${HOMEBREW_UPDATE_AUTO}" ]]
|
||||
then
|
||||
git fetch --tags --force "${QUIET_ARGS[@]}" origin \
|
||||
"refs/heads/${UPSTREAM_BRANCH_DIR}:refs/remotes/origin/${UPSTREAM_BRANCH_DIR}" 2>/dev/null
|
||||
@ -701,10 +701,10 @@ EOS
|
||||
|
||||
for DIR in "${HOMEBREW_REPOSITORY}" "${HOMEBREW_LIBRARY}"/Taps/*/*
|
||||
do
|
||||
# HOMEBREW_UPDATE_PREINSTALL wasn't modified in subshell.
|
||||
# HOMEBREW_UPDATE_AUTO wasn't modified in subshell.
|
||||
# shellcheck disable=SC2031
|
||||
if [[ -n "${HOMEBREW_INSTALL_FROM_API}" ]] &&
|
||||
[[ -n "${HOMEBREW_UPDATE_PREINSTALL}" ]] &&
|
||||
[[ -n "${HOMEBREW_UPDATE_AUTO}" ]] &&
|
||||
[[ "${DIR}" == "${HOMEBREW_CORE_REPOSITORY}" ||
|
||||
"${DIR}" == "${HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-cask" ]]
|
||||
then
|
||||
@ -747,7 +747,7 @@ EOS
|
||||
|
||||
safe_cd "${HOMEBREW_REPOSITORY}"
|
||||
|
||||
# HOMEBREW_UPDATE_PREINSTALL wasn't modified in subshell.
|
||||
# HOMEBREW_UPDATE_AUTO wasn't modified in subshell.
|
||||
# shellcheck disable=SC2031
|
||||
if [[ -n "${HOMEBREW_UPDATED}" ]] ||
|
||||
[[ -n "${HOMEBREW_UPDATE_FAILED}" ]] ||
|
||||
@ -756,11 +756,11 @@ EOS
|
||||
[[ -n "${HOMEBREW_MIGRATE_LINUXBREW_FORMULAE}" ]] ||
|
||||
[[ -d "${HOMEBREW_LIBRARY}/LinkedKegs" ]] ||
|
||||
[[ ! -f "${HOMEBREW_CACHE}/all_commands_list.txt" ]] ||
|
||||
[[ -n "${HOMEBREW_DEVELOPER}" && -z "${HOMEBREW_UPDATE_PREINSTALL}" ]]
|
||||
[[ -n "${HOMEBREW_DEVELOPER}" && -z "${HOMEBREW_UPDATE_AUTO}" ]]
|
||||
then
|
||||
brew update-report "$@"
|
||||
return $?
|
||||
elif [[ -z "${HOMEBREW_UPDATE_PREINSTALL}" && -z "${HOMEBREW_QUIET}" ]]
|
||||
elif [[ -z "${HOMEBREW_UPDATE_AUTO}" && -z "${HOMEBREW_QUIET}" ]]
|
||||
then
|
||||
echo "Already up-to-date."
|
||||
fi
|
||||
|
@ -325,8 +325,13 @@ module Homebrew
|
||||
default_text: "macOS: `/private/tmp`, Linux: `/tmp`.",
|
||||
default: HOMEBREW_DEFAULT_TEMP,
|
||||
},
|
||||
HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED: {
|
||||
description: "If set, `brew update` only lists updates to installed software.",
|
||||
HOMEBREW_UPDATE_REPORT_ALL_FORMULAE: {
|
||||
description: "If set, `brew update` lists updates to all software.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_UPDATE_REPORT_VERSION_CHANGED_FORMULAE: {
|
||||
description: "If set, `brew update` only lists updates to formulae with differing versions. " \
|
||||
"Note this is slower than the default behaviour.",
|
||||
boolean: true,
|
||||
},
|
||||
HOMEBREW_UPDATE_TO_TAG: {
|
||||
|
@ -195,11 +195,11 @@ describe Homebrew::Completions do
|
||||
|
||||
it "returns an array of options for a shell command" do
|
||||
expected_options = {
|
||||
"--auto-update" => "Run on auto-updates (e.g. before `brew install`). Skips some slower steps.",
|
||||
"--debug" => "Display a trace of all shell commands as they are executed.",
|
||||
"--force" => "Always do a slower, full update check (even if unnecessary).",
|
||||
"--help" => "Show this message.",
|
||||
"--merge" => "Use `git merge` to apply updates (rather than `git rebase`).",
|
||||
"--preinstall" => "Run on auto-updates (e.g. before `brew install`). Skips some slower steps.",
|
||||
"--quiet" => "Make some output more quiet",
|
||||
"--verbose" => "Print the directories checked and `git` operations performed.",
|
||||
}
|
||||
@ -277,11 +277,11 @@ describe Homebrew::Completions do
|
||||
case "${cur}" in
|
||||
-*)
|
||||
__brewcomp "
|
||||
--auto-update
|
||||
--debug
|
||||
--force
|
||||
--help
|
||||
--merge
|
||||
--preinstall
|
||||
--quiet
|
||||
--verbose
|
||||
"
|
||||
@ -342,11 +342,11 @@ describe Homebrew::Completions do
|
||||
# brew update
|
||||
_brew_update() {
|
||||
_arguments \\
|
||||
'--auto-update[Run on auto-updates (e.g. before `brew install`). Skips some slower steps]' \\
|
||||
'--debug[Display a trace of all shell commands as they are executed]' \\
|
||||
'--force[Always do a slower, full update check (even if unnecessary)]' \\
|
||||
'--help[Show this message]' \\
|
||||
'--merge[Use `git merge` to apply updates (rather than `git rebase`)]' \\
|
||||
'--preinstall[Run on auto-updates (e.g. before `brew install`). Skips some slower steps]' \\
|
||||
'--quiet[Make some output more quiet]' \\
|
||||
'--verbose[Print the directories checked and `git` operations performed]'
|
||||
}
|
||||
@ -402,11 +402,11 @@ describe Homebrew::Completions do
|
||||
completion = described_class.generate_fish_subcommand_completion("update")
|
||||
expect(completion).to eq <<~COMPLETION
|
||||
__fish_brew_complete_cmd 'update' 'Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations'
|
||||
__fish_brew_complete_arg 'update' -l auto-update -d 'Run on auto-updates (e.g. before `brew install`). Skips some slower steps'
|
||||
__fish_brew_complete_arg 'update' -l debug -d 'Display a trace of all shell commands as they are executed'
|
||||
__fish_brew_complete_arg 'update' -l force -d 'Always do a slower, full update check (even if unnecessary)'
|
||||
__fish_brew_complete_arg 'update' -l help -d 'Show this message'
|
||||
__fish_brew_complete_arg 'update' -l merge -d 'Use `git merge` to apply updates (rather than `git rebase`)'
|
||||
__fish_brew_complete_arg 'update' -l preinstall -d 'Run on auto-updates (e.g. before `brew install`). Skips some slower steps'
|
||||
__fish_brew_complete_arg 'update' -l quiet -d 'Make some output more quiet'
|
||||
__fish_brew_complete_arg 'update' -l verbose -d 'Print the directories checked and `git` operations performed'
|
||||
COMPLETION
|
||||
|
@ -2199,11 +2199,11 @@ _brew_up() {
|
||||
case "${cur}" in
|
||||
-*)
|
||||
__brewcomp "
|
||||
--auto-update
|
||||
--debug
|
||||
--force
|
||||
--help
|
||||
--merge
|
||||
--preinstall
|
||||
--quiet
|
||||
--verbose
|
||||
"
|
||||
@ -2218,11 +2218,11 @@ _brew_update() {
|
||||
case "${cur}" in
|
||||
-*)
|
||||
__brewcomp "
|
||||
--auto-update
|
||||
--debug
|
||||
--force
|
||||
--help
|
||||
--merge
|
||||
--preinstall
|
||||
--quiet
|
||||
--verbose
|
||||
"
|
||||
@ -2294,10 +2294,10 @@ _brew_update_report() {
|
||||
case "${cur}" in
|
||||
-*)
|
||||
__brewcomp "
|
||||
--auto-update
|
||||
--debug
|
||||
--force
|
||||
--help
|
||||
--preinstall
|
||||
--quiet
|
||||
--verbose
|
||||
"
|
||||
|
@ -1468,21 +1468,21 @@ __fish_brew_complete_arg 'untap' -a '(__fish_brew_suggest_taps_installed)'
|
||||
|
||||
|
||||
__fish_brew_complete_cmd 'up' 'Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations'
|
||||
__fish_brew_complete_arg 'up' -l auto-update -d 'Run on auto-updates (e.g. before `brew install`). Skips some slower steps'
|
||||
__fish_brew_complete_arg 'up' -l debug -d 'Display a trace of all shell commands as they are executed'
|
||||
__fish_brew_complete_arg 'up' -l force -d 'Always do a slower, full update check (even if unnecessary)'
|
||||
__fish_brew_complete_arg 'up' -l help -d 'Show this message'
|
||||
__fish_brew_complete_arg 'up' -l merge -d 'Use `git merge` to apply updates (rather than `git rebase`)'
|
||||
__fish_brew_complete_arg 'up' -l preinstall -d 'Run on auto-updates (e.g. before `brew install`). Skips some slower steps'
|
||||
__fish_brew_complete_arg 'up' -l quiet -d 'Make some output more quiet'
|
||||
__fish_brew_complete_arg 'up' -l verbose -d 'Print the directories checked and `git` operations performed'
|
||||
|
||||
|
||||
__fish_brew_complete_cmd 'update' 'Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations'
|
||||
__fish_brew_complete_arg 'update' -l auto-update -d 'Run on auto-updates (e.g. before `brew install`). Skips some slower steps'
|
||||
__fish_brew_complete_arg 'update' -l debug -d 'Display a trace of all shell commands as they are executed'
|
||||
__fish_brew_complete_arg 'update' -l force -d 'Always do a slower, full update check (even if unnecessary)'
|
||||
__fish_brew_complete_arg 'update' -l help -d 'Show this message'
|
||||
__fish_brew_complete_arg 'update' -l merge -d 'Use `git merge` to apply updates (rather than `git rebase`)'
|
||||
__fish_brew_complete_arg 'update' -l preinstall -d 'Run on auto-updates (e.g. before `brew install`). Skips some slower steps'
|
||||
__fish_brew_complete_arg 'update' -l quiet -d 'Make some output more quiet'
|
||||
__fish_brew_complete_arg 'update' -l verbose -d 'Print the directories checked and `git` operations performed'
|
||||
|
||||
@ -1518,10 +1518,10 @@ __fish_brew_complete_arg 'update-python-resources' -a '(__fish_brew_suggest_form
|
||||
|
||||
|
||||
__fish_brew_complete_cmd 'update-report' 'The Ruby implementation of `brew update`'
|
||||
__fish_brew_complete_arg 'update-report' -l auto-update -d 'Run in \'auto-update\' mode (faster, less output)'
|
||||
__fish_brew_complete_arg 'update-report' -l debug -d 'Display any debugging information'
|
||||
__fish_brew_complete_arg 'update-report' -l force -d 'Treat installed and updated formulae as if they are from the same taps and migrate them anyway'
|
||||
__fish_brew_complete_arg 'update-report' -l help -d 'Show this message'
|
||||
__fish_brew_complete_arg 'update-report' -l preinstall -d 'Run in \'auto-update\' mode (faster, less output)'
|
||||
__fish_brew_complete_arg 'update-report' -l quiet -d 'Make some output more quiet'
|
||||
__fish_brew_complete_arg 'update-report' -l verbose -d 'Make some output more verbose'
|
||||
|
||||
|
@ -1798,11 +1798,11 @@ _brew_untap() {
|
||||
# brew up
|
||||
_brew_up() {
|
||||
_arguments \
|
||||
'--auto-update[Run on auto-updates (e.g. before `brew install`). Skips some slower steps]' \
|
||||
'--debug[Display a trace of all shell commands as they are executed]' \
|
||||
'--force[Always do a slower, full update check (even if unnecessary)]' \
|
||||
'--help[Show this message]' \
|
||||
'--merge[Use `git merge` to apply updates (rather than `git rebase`)]' \
|
||||
'--preinstall[Run on auto-updates (e.g. before `brew install`). Skips some slower steps]' \
|
||||
'--quiet[Make some output more quiet]' \
|
||||
'--verbose[Print the directories checked and `git` operations performed]'
|
||||
}
|
||||
@ -1810,11 +1810,11 @@ _brew_up() {
|
||||
# brew update
|
||||
_brew_update() {
|
||||
_arguments \
|
||||
'--auto-update[Run on auto-updates (e.g. before `brew install`). Skips some slower steps]' \
|
||||
'--debug[Display a trace of all shell commands as they are executed]' \
|
||||
'--force[Always do a slower, full update check (even if unnecessary)]' \
|
||||
'--help[Show this message]' \
|
||||
'--merge[Use `git merge` to apply updates (rather than `git rebase`)]' \
|
||||
'--preinstall[Run on auto-updates (e.g. before `brew install`). Skips some slower steps]' \
|
||||
'--quiet[Make some output more quiet]' \
|
||||
'--verbose[Print the directories checked and `git` operations performed]'
|
||||
}
|
||||
@ -1859,10 +1859,10 @@ _brew_update_python_resources() {
|
||||
# brew update-report
|
||||
_brew_update_report() {
|
||||
_arguments \
|
||||
'--auto-update[Run in '\''auto-update'\'' mode (faster, less output)]' \
|
||||
'--debug[Display any debugging information]' \
|
||||
'--force[Treat installed and updated formulae as if they are from the same taps and migrate them anyway]' \
|
||||
'--help[Show this message]' \
|
||||
'--preinstall[Run in '\''auto-update'\'' mode (faster, less output)]' \
|
||||
'--quiet[Make some output more quiet]' \
|
||||
'--verbose[Make some output more verbose]'
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1)
|
||||
|
||||
* `--merge`:
|
||||
Use `git merge` to apply updates (rather than `git rebase`).
|
||||
* `--preinstall`:
|
||||
* `--auto-update`:
|
||||
Run on auto-updates (e.g. before `brew install`). Skips some slower steps.
|
||||
* `-f`, `--force`:
|
||||
Always do a slower, full update check (even if unnecessary).
|
||||
@ -2171,8 +2171,11 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
|
||||
|
||||
*Default:* macOS: `/private/tmp`, Linux: `/tmp`.
|
||||
|
||||
- `HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`
|
||||
<br>If set, `brew update` only lists updates to installed software.
|
||||
- `HOMEBREW_UPDATE_REPORT_ALL_FORMULAE`
|
||||
<br>If set, `brew update` lists updates to all software.
|
||||
|
||||
- `HOMEBREW_UPDATE_REPORT_VERSION_CHANGED_FORMULAE`
|
||||
<br>If set, `brew update` only lists updates to formulae with differing versions. Note this is slower than the default behaviour.
|
||||
|
||||
- `HOMEBREW_UPDATE_TO_TAG`
|
||||
<br>If set, always use the latest stable tag (even if developer commands have been run).
|
||||
|
@ -936,7 +936,7 @@ Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\f
|
||||
Use \fBgit merge\fR to apply updates (rather than \fBgit rebase\fR)\.
|
||||
.
|
||||
.TP
|
||||
\fB\-\-preinstall\fR
|
||||
\fB\-\-auto\-update\fR
|
||||
Run on auto\-updates (e\.g\. before \fBbrew install\fR)\. Skips some slower steps\.
|
||||
.
|
||||
.TP
|
||||
@ -3183,10 +3183,16 @@ Use this path as the temporary directory for building packages\. Changing this m
|
||||
\fIDefault:\fR macOS: \fB/private/tmp\fR, Linux: \fB/tmp\fR\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_UPDATE_REPORT_ONLY_INSTALLED\fR
|
||||
\fBHOMEBREW_UPDATE_REPORT_ALL_FORMULAE\fR
|
||||
.
|
||||
.br
|
||||
If set, \fBbrew update\fR only lists updates to installed software\.
|
||||
If set, \fBbrew update\fR lists updates to all software\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_UPDATE_REPORT_VERSION_CHANGED_FORMULAE\fR
|
||||
.
|
||||
.br
|
||||
If set, \fBbrew update\fR only lists updates to formulae with differing versions\. Note this is slower than the default behaviour\.
|
||||
.
|
||||
.TP
|
||||
\fBHOMEBREW_UPDATE_TO_TAG\fR
|
||||
|
Loading…
x
Reference in New Issue
Block a user