Skip to content

Commit

Permalink
Merge branch 'master' into docker-registry-token-documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
azatoth committed Mar 18, 2024
2 parents c2c0c24 + bb753a6 commit 76301fa
Show file tree
Hide file tree
Showing 416 changed files with 12,757 additions and 7,300 deletions.
5 changes: 1 addition & 4 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
self-hosted-runner:
# Labels of self-hosted runner in array of strings.
labels:
# TODO: technically not a self-hosted runner but avoids errors until a new
# version of actionlint is released.
- macos-14
labels: []
# Configuration variables in array of strings defined in your repository or
# organization. `null` means disabling configuration variables check.
# Empty array means no configuration variable is allowed.
Expand Down
2 changes: 1 addition & 1 deletion .github/maintainers.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["Moisan","timsutton","MikeMcQuaid","singingwolfboy","issyl0","dtrodrigues","dduugg","bayandin","Bo98","reitermarkus","SMillerDev","chenrui333","samford","fxcoudert","EricFromCanada","iMichka","alebcay","miccal","razvanazamfirei","branchvincent","gdams","cho-m","ZhongRuoyu","carlocab","Rylan12","nandahkrishna","krehel","bevanjkay","apainintheneck","p-linnane"]
["Moisan","timsutton","MikeMcQuaid","singingwolfboy","issyl0","dtrodrigues","dduugg","bayandin","Bo98","reitermarkus","SMillerDev","chenrui333","samford","fxcoudert","EricFromCanada","iMichka","alebcay","miccal","razvanazamfirei","branchvincent","cho-m","ZhongRuoyu","carlocab","Rylan12","nandahkrishna","krehel","bevanjkay","apainintheneck","p-linnane"]
2 changes: 1 addition & 1 deletion .github/workflows/sponsors-maintainers-man-completions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Update sponsors, maintainers, manpage and completions
on:
push:
branches:
- "**"
- master
paths:
- .github/workflows/sponsors-maintainers-man-completions.yml
- README.md
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ jobs:
- name: Set up all Homebrew taps
run: |
brew tap homebrew/aliases
brew tap homebrew/autoupdate
brew tap homebrew/bundle
brew tap homebrew/cask-fonts
brew tap homebrew/cask-versions
Expand All @@ -127,7 +126,6 @@ jobs:
homebrew/test-bot
brew style homebrew/aliases \
homebrew/autoupdate\
homebrew/command-not-found \
homebrew/formula-analytics \
homebrew/portable-ruby
Expand Down
7 changes: 2 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.DS_Store

# Unignore the contents of `Library` as that's where our code lives.
!/Library/
!/Library

# Ignore files within `Library` (again).
/Library/Homebrew/.npmignore
Expand Down Expand Up @@ -82,16 +82,15 @@
**/vendor/bundle/ruby/*/gems/erubi-*/
**/vendor/bundle/ruby/*/gems/hana-*/
**/vendor/bundle/ruby/*/gems/highline-*/
**/vendor/bundle/ruby/*/gems/hpricot-*/
**/vendor/bundle/ruby/*/gems/jaro_winkler-*/
**/vendor/bundle/ruby/*/gems/json-*/
**/vendor/bundle/ruby/*/gems/json_schemer-*/
**/vendor/bundle/ruby/*/gems/kramdown-*/
**/vendor/bundle/ruby/*/gems/language_server-protocol-*/
**/vendor/bundle/ruby/*/gems/method_source-*/
**/vendor/bundle/ruby/*/gems/mini_portile2-*/
**/vendor/bundle/ruby/*/gems/minitest-*/
**/vendor/bundle/ruby/*/gems/msgpack-*/
**/vendor/bundle/ruby/*/gems/mustache-*/
**/vendor/bundle/ruby/*/gems/netrc-*/
**/vendor/bundle/ruby/*/gems/ntlm-http-*/
**/vendor/bundle/ruby/*/gems/parallel-*/
Expand All @@ -106,10 +105,8 @@
**/vendor/bundle/ruby/*/gems/racc-*/
**/vendor/bundle/ruby/*/gems/rainbow-*/
**/vendor/bundle/ruby/*/gems/rbi-*/
**/vendor/bundle/ruby/*/gems/rdiscount-*/
**/vendor/bundle/ruby/*/gems/regexp_parser-*/
**/vendor/bundle/ruby/*/gems/rexml-*/
**/vendor/bundle/ruby/*/gems/ronn-*/
**/vendor/bundle/ruby/*/gems/rspec-*/
**/vendor/bundle/ruby/*/gems/rspec-core-*/
**/vendor/bundle/ruby/*/gems/rspec-expectations-*/
Expand Down
3 changes: 0 additions & 3 deletions Library/.rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,6 @@ Style/HashAsLastArrayItem:
- "/**/Formula/**/*.rb"
- "**/Formula/**/*.rb"

Style/HashSyntax:
EnforcedShorthandSyntax: either

Style/InverseMethods:
InverseMethods:
:blank?: :present?
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ group :livecheck, optional: true do
gem "ruby-progressbar", require: false
end
group :man, optional: true do
gem "ronn", require: false
gem "kramdown", require: false
end
group :pr_upload, optional: true do
gem "json_schemer", require: false
Expand Down
43 changes: 19 additions & 24 deletions Library/Homebrew/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ GEM
erubi (1.12.0)
hana (1.3.7)
highline (2.0.3)
hpricot (0.8.6)
json (2.7.1)
json_schemer (2.1.1)
hana (~> 1.3)
regexp_parser (~> 2.0)
simpleidn (~> 0.2)
kramdown (2.4.0)
rexml
language_server-protocol (3.17.0.3)
method_source (1.0.0)
minitest (5.22.2)
minitest (5.22.3)
msgpack (1.7.2)
mustache (1.1.1)
netrc (0.11.0)
parallel (1.24.0)
parallel_tests (4.5.1)
parallel_tests (4.5.2)
parallel
parlour (8.1.0)
commander (~> 4.5)
Expand All @@ -55,13 +55,8 @@ GEM
rbi (0.1.9)
prism (>= 0.18.0, < 0.25)
sorbet-runtime (>= 0.5.9204)
rdiscount (2.2.7.3)
regexp_parser (2.9.0)
rexml (3.2.6)
ronn (0.7.3)
hpricot (>= 0.8.2)
mustache (>= 0.7.0)
rdiscount (>= 1.5.8)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
Expand All @@ -86,18 +81,18 @@ GEM
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.61.0)
rubocop (1.62.1)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.1)
rubocop-ast (1.31.2)
parser (>= 3.3.0.4)
rubocop-capybara (2.20.0)
rubocop (~> 1.41)
Expand All @@ -108,11 +103,11 @@ GEM
rubocop-performance (1.20.2)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rspec (2.26.1)
rubocop-rspec (2.27.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-sorbet (0.7.7)
rubocop-sorbet (0.7.8)
rubocop (>= 0.90.0)
ruby-macho (4.0.1)
ruby-prof (1.7.0)
Expand All @@ -128,15 +123,15 @@ GEM
simplecov_json_formatter (0.1.4)
simpleidn (0.2.1)
unf (~> 0.1.4)
sorbet (0.5.11276)
sorbet-static (= 0.5.11276)
sorbet-runtime (0.5.11276)
sorbet-static (0.5.11276-aarch64-linux)
sorbet-static (0.5.11276-universal-darwin)
sorbet-static (0.5.11276-x86_64-linux)
sorbet-static-and-runtime (0.5.11276)
sorbet (= 0.5.11276)
sorbet-runtime (= 0.5.11276)
sorbet (0.5.11294)
sorbet-static (= 0.5.11294)
sorbet-runtime (0.5.11294)
sorbet-static (0.5.11294-aarch64-linux)
sorbet-static (0.5.11294-universal-darwin)
sorbet-static (0.5.11294-x86_64-linux)
sorbet-static-and-runtime (0.5.11294)
sorbet (= 0.5.11294)
sorbet-runtime (= 0.5.11294)
spoom (1.2.4)
erubi (>= 1.10.0)
sorbet-static-and-runtime (>= 0.5.10187)
Expand Down Expand Up @@ -177,6 +172,7 @@ DEPENDENCIES
bootsnap
byebug
json_schemer
kramdown
method_source
minitest
parallel_tests
Expand All @@ -185,7 +181,6 @@ DEPENDENCIES
plist
pry
rexml
ronn
rspec
rspec-github
rspec-its
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/PATH.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def empty?

sig { returns(T.nilable(T.self_type)) }
def existing
existing_path = select(&File.method(:directory?))
existing_path = select { File.directory?(_1) }
# return nil instead of empty PATH, to unset environment variables
existing_path unless existing_path.empty?
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def self.fetch_json_api_file(endpoint, target: HOMEBREW_CACHE_API/endpoint,
end

mtime = insecure_download ? Time.new(1970, 1, 1) : Time.now
FileUtils.touch(target, mtime: mtime) unless skip_download
FileUtils.touch(target, mtime:) unless skip_download
JSON.parse(target.read, freeze: true)
rescue JSON::ParserError
target.unlink
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/api/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def self.all_renames
def self.write_names(regenerate: false)
download_and_cache_data! unless cache.key?("casks")

Homebrew::API.write_names_file(all_casks.keys, "cask", regenerate: regenerate)
Homebrew::API.write_names_file(all_casks.keys, "cask", regenerate:)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/api/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def self.tap_git_head
def self.write_names_and_aliases(regenerate: false)
download_and_cache_data! unless cache.key?("formulae")

return unless Homebrew::API.write_names_file(all_formulae.keys, "formula", regenerate: regenerate)
return unless Homebrew::API.write_names_file(all_formulae.keys, "formula", regenerate:)

(HOMEBREW_CACHE_API/"formula_aliases.txt").open("w") do |file|
all_aliases.each do |alias_name, real_name|
Expand Down
10 changes: 5 additions & 5 deletions Library/Homebrew/brew.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
# - no arguments are passed
if empty_argv || help_flag
require "help"
Homebrew::Help.help cmd, remaining_args: args.remaining, empty_argv: empty_argv
Homebrew::Help.help cmd, remaining_args: args.remaining, empty_argv:
# `Homebrew::Help.help` never returns, except for unknown commands.
end

Expand Down Expand Up @@ -133,14 +133,14 @@
Homebrew::Help.help cmd, remaining_args: args.remaining, usage_error: e.message
rescue SystemExit => e
onoe "Kernel.exit" if args.debug? && !e.success?
$stderr.puts Utils::Backtrace.clean(e) if args.debug?
$stderr.puts Utils::Backtrace.clean(e) if args&.debug? || ARGV.include?("--debug")
raise
rescue Interrupt
$stderr.puts # seemingly a newline is typical
exit 130
rescue BuildError => e
Utils::Analytics.report_build_error(e)
e.dump(verbose: args.verbose?)
e.dump(verbose: args&.verbose?)

if e.formula.head? || e.formula.deprecated? || e.formula.disabled?
reason = if e.formula.head?
Expand All @@ -167,7 +167,7 @@
raise if e.message.empty?

onoe e
$stderr.puts Utils::Backtrace.clean(e) if args.debug?
$stderr.puts Utils::Backtrace.clean(e) if args&.debug? || ARGV.include?("--debug")

exit 1
rescue MethodDeprecatedError => e
Expand All @@ -176,7 +176,7 @@
$stderr.puts "If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):"
$stderr.puts " #{Formatter.url(e.issues_url)}"
end
$stderr.puts Utils::Backtrace.clean(e) if args.debug?
$stderr.puts Utils::Backtrace.clean(e) if args&.debug? || ARGV.include?("--debug")
exit 1
rescue Exception => e # rubocop:disable Lint/RescueException
onoe e
Expand Down
36 changes: 5 additions & 31 deletions Library/Homebrew/brew.sh
Original file line number Diff line number Diff line change
Expand Up @@ -262,22 +262,6 @@ check-array-membership() {
fi
}

# Let user know we're still updating Homebrew if brew update --auto-update
# exceeds 3 seconds.
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 --auto-update`...' >&2
if [[ -z "${HOMEBREW_NO_ENV_HINTS}" && -z "${HOMEBREW_AUTO_UPDATE_SECS}" ]]
then
# shellcheck disable=SC2016
echo 'Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with' >&2
# shellcheck disable=SC2016
echo 'HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).' >&2
fi
}

# These variables are set from various Homebrew scripts.
# shellcheck disable=SC2154
auto-update() {
Expand Down Expand Up @@ -339,20 +323,8 @@ auto-update() {
return
fi

if [[ -z "${HOMEBREW_VERBOSE}" ]]
then
auto-update-timer &
timer_pid=$!
fi

brew update --auto-update

if [[ -n "${timer_pid}" ]]
then
kill "${timer_pid}" 2>/dev/null
wait "${timer_pid}" 2>/dev/null
fi

unset HOMEBREW_AUTO_UPDATING

# Restore user path as it'll be refiltered by HOMEBREW_BREW_FILE (bin/brew)
Expand Down Expand Up @@ -866,7 +838,8 @@ if check-array-membership "${HOMEBREW_COMMAND}" "${AUTO_UPDATE_CORE_TAP_COMMANDS
then
export HOMEBREW_AUTO_UPDATE_COMMAND="1"
export HOMEBREW_AUTO_UPDATE_CORE_TAP="1"
else
elif [[ -z "${HOMEBREW_AUTO_UPDATING}" ]]
then
unset HOMEBREW_AUTO_UPDATE_CORE_TAP
fi

Expand All @@ -880,8 +853,9 @@ if check-array-membership "${HOMEBREW_COMMAND}" "${AUTO_UPDATE_CASK_TAP_COMMANDS
then
export HOMEBREW_AUTO_UPDATE_COMMAND="1"
export HOMEBREW_AUTO_UPDATE_CASK_TAP="1"
else
unset HOMEBREW_AUTO_UPDATE_CORE_TAP
elif [[ -z "${HOMEBREW_AUTO_UPDATING}" ]]
then
unset HOMEBREW_AUTO_UPDATE_CASK_TAP
fi

# Disable Ruby options we don't need.
Expand Down
Loading

0 comments on commit 76301fa

Please sign in to comment.