language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
Homebrew
brew
56e6710064bcbe8edc1caa97ed0bfb6ac8450e99.json
Upgrade outdated formulae with `brew install`
Library/Homebrew/cmd/install.rb
@@ -396,6 +396,20 @@ def install_formula(f, args:) f.print_tap_action build_options = f.build + if f.outdated? && !f.head? + formulae = [f] + f.old_installed_formulae + version_upgrade = "#{f.linked_version} -> #{f.pkg_version}" + + oh1 <<~EOS + #{f.name} #{f.linked_version} is inst...
true
Other
Homebrew
brew
56e6710064bcbe8edc1caa97ed0bfb6ac8450e99.json
Upgrade outdated formulae with `brew install`
Library/Homebrew/formula_installer.rb
@@ -351,12 +351,7 @@ def install message = <<~EOS #{formula.name} #{formula.linked_version} is already installed EOS - if formula.outdated? && !formula.head? - message += <<~EOS - To upgrade to #{formula.pkg_version}, run: - brew upgrade #{formula.full_name} - ...
true
Other
Homebrew
brew
e3cf41e3ab6178f94e340fa9c6b5b5790e32a09b.json
Add missing negations
Library/Homebrew/install.rb
@@ -118,7 +118,7 @@ def install_formula?( end prefix_installed = f.prefix.exist? && !f.prefix.children.empty? - if f.keg_only? && f.any_version_installed? && f.optlinked? && force + if f.keg_only? && f.any_version_installed? && f.optlinked? && !force # keg-only install is only possibl...
false
Other
Homebrew
brew
4fd938c2861565a720eaca56c516c49d9d865fe9.json
Update RBI files for rubocop.
Library/Homebrew/sorbet/rbi/gems/rubocop@1.16.1.rbi
@@ -10044,6 +10044,7 @@ class RuboCop::Cop::Style::QuotedSymbols < ::RuboCop::Cop::Base def alternative_style; end def autocorrect(corrector, node); end def correct_quotes(str); end + def hash_colon_key?(node); end def quoted?(sym_node); end def style; end def wrong_quotes?(node); end @@ -10452,15 +1...
false
Other
Homebrew
brew
c2eab8f2144ebf41f3d2b7cee099d3980faf5d25.json
Update RBI files for rubocop-rspec.
Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.4.0.rbi
@@ -4,19 +4,14 @@ # typed: true -module RuboCop -end - -module RuboCop::Cop -end - -module RuboCop::Cop::Layout -end +module RuboCop; end +module RuboCop::Cop; end +module RuboCop::Cop::Layout; end class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base - include(::RuboCop::Cop::PrecedingFollowingAlign...
true
Other
Homebrew
brew
c2eab8f2144ebf41f3d2b7cee099d3980faf5d25.json
Update RBI files for rubocop-rspec.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -26803,6 +26803,7 @@ end module RuboCop::AST::NodePattern::Sets SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) + SET_EQL_EQ_BE = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_SYSTEM_SHELL_OU...
true
Other
Homebrew
brew
06a48f24cde4647a726e0b190aafd318bb165454.json
sorbet: Update RBI files. Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -12662,6 +12662,7 @@ class Object DEPRECATED_OFFICIAL_TAPS = ::T.let(nil, ::T.untyped) ENV = ::T.let(nil, ::T.untyped) FORMULA_COMPONENT_PRECEDENCE_LIST = ::T.let(nil, ::T.untyped) + HIDDEN_DESC_PLACEHOLDER = ::T.let(nil, ::T.untyped) HOMEBREW_BOTTLES_EXTNAME_REGEX = ::T.let(nil, ::T.untyped) HOMEBRE...
false
Other
Homebrew
brew
155feba8e057e8dc66661ad6fe8021a30a5c4e93.json
cask/installer: Add Cask caveats to the end-of-operation summary - Both formulae and casks can have caveats, but only formulae caveats were shown at the end of a bulk install/upgrade/reinstall operation via `Homebrew.messages.record_caveats`. This fixes that to show Cask caveats too, for consistency (scrolling u...
Library/Homebrew/cask/installer.rb
@@ -56,6 +56,8 @@ def self.caveats(cask) caveats = cask.caveats return if caveats.empty? + Homebrew.messages.record_caveats(cask.token, caveats) + <<~EOS #{ohai_title "Caveats"} #{caveats}
true
Other
Homebrew
brew
155feba8e057e8dc66661ad6fe8021a30a5c4e93.json
cask/installer: Add Cask caveats to the end-of-operation summary - Both formulae and casks can have caveats, but only formulae caveats were shown at the end of a bulk install/upgrade/reinstall operation via `Homebrew.messages.record_caveats`. This fixes that to show Cask caveats too, for consistency (scrolling u...
Library/Homebrew/formula_installer.rb
@@ -769,7 +769,7 @@ def caveats @show_summary_heading = true ohai "Caveats", caveats.to_s - Homebrew.messages.record_caveats(formula, caveats) + Homebrew.messages.record_caveats(formula.name, caveats) end sig { void }
true
Other
Homebrew
brew
155feba8e057e8dc66661ad6fe8021a30a5c4e93.json
cask/installer: Add Cask caveats to the end-of-operation summary - Both formulae and casks can have caveats, but only formulae caveats were shown at the end of a bulk install/upgrade/reinstall operation via `Homebrew.messages.record_caveats`. This fixes that to show Cask caveats too, for consistency (scrolling u...
Library/Homebrew/messages.rb
@@ -15,8 +15,8 @@ def initialize @install_times = [] end - def record_caveats(f, caveats) - @caveats.push(formula: f.name, caveats: caveats) + def record_caveats(package, caveats) + @caveats.push(package: package, caveats: caveats) end def formula_installed(f, elapsed_time) @@ -36,7 +36,7 @@ d...
true
Other
Homebrew
brew
45f23d4c16223695dfa1685697f8f610d6dcbece.json
docs: improve terminology guide from code review Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/manpages/brew.1.md.erb
@@ -30,21 +30,25 @@ Linux distribution to your home directory without requiring `sudo`. ## TERMINOLOGY -**Formula**: The package definition +**formula**: Homebrew package definition built from upstream sources -**Cask**: An extension of Homebrew to install macOS native apps +**cask**: Homebrew package definition...
true
Other
Homebrew
brew
45f23d4c16223695dfa1685697f8f610d6dcbece.json
docs: improve terminology guide from code review Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
docs/Manpage.md
@@ -14,21 +14,25 @@ Linux distribution to your home directory without requiring `sudo`. ## TERMINOLOGY -**Formula**: The package definition +**formula**: Homebrew package definition built from upstream sources -**Cask**: An extension of Homebrew to install macOS native apps +**cask**: Homebrew package definition...
true
Other
Homebrew
brew
45f23d4c16223695dfa1685697f8f610d6dcbece.json
docs: improve terminology guide from code review Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
manpages/brew.1
@@ -16,36 +16,44 @@ Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn\'t include with macOS\. It can also install software not packaged for your Linux distribution to your home directory without requiring \fBsudo\fR\. . .SH "TERMINOLOGY" -\fBFormula\fR - The package definition +\f...
true
Other
Homebrew
brew
3a746723c351a582c2711b67c412e3905527776e.json
Add missing comma
Library/Homebrew/os/mac/version.rb
@@ -14,7 +14,7 @@ class Version < ::Version extend T::Sig SYMBOLS = { - monterey: "12" + monterey: "12", big_sur: "11", catalina: "10.15", mojave: "10.14",
false
Other
Homebrew
brew
d7d9a256a13727fee0f802a2f3e22062a6d68774.json
Add macOS 12
Library/Homebrew/os/mac/version.rb
@@ -14,6 +14,7 @@ class Version < ::Version extend T::Sig SYMBOLS = { + monterey: "12" big_sur: "11", catalina: "10.15", mojave: "10.14",
false
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
Library/Homebrew/dev-cmd/generate-man-completions.rb
@@ -67,7 +67,6 @@ def build_man_page(quiet:) generate_cmd_manpages(Commands.official_external_commands_paths(quiet: quiet)) variables[:global_cask_options] = global_cask_options_manpage variables[:global_options] = global_options_manpage - variables[:terminology] = terminology_manpage variables...
true
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
Library/Homebrew/manpages/brew.1.md.erb
@@ -28,6 +28,24 @@ Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with macOS. It can also install software not packaged for your Linux distribution to your home directory without requiring `sudo`. +## TERMINOLOGY + +**Formula**: The package definition + +**Cask**: An ex...
true
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
docs/Formula-Cookbook.md
@@ -8,7 +8,8 @@ A *formula* is a package definition written in Ruby. It can be created with `bre |----------------|------------------------------------------------------------|-----------------------------------------------------------------| | **Formula** | The package definition ...
true
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
docs/Manpage.md
@@ -12,6 +12,24 @@ Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with macOS. It can also install software not packaged for your Linux distribution to your home directory without requiring `sudo`. +## TERMINOLOGY + +**Formula**: The package definition + +**Cask**: An ex...
true
Other
Homebrew
brew
2c22a258a08c3e6366fc7e6092ae2a01be0f3641.json
docs: Separate terminology from cookbook and manpages
manpages/brew.1
@@ -15,6 +15,38 @@ .SH "DESCRIPTION" Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn\'t include with macOS\. It can also install software not packaged for your Linux distribution to your home directory without requiring \fBsudo\fR\. . +.SH "TERMINOLOGY" +\fBFormula\fR + The pack...
true
Other
Homebrew
brew
c4d69dd2e903f7faa810da59cf4b307bd8cdd116.json
Revert "fix(vendor-gems): redirect bundler stdout to stderr"
Library/Homebrew/dev-cmd/vendor-gems.rb
@@ -40,7 +40,7 @@ def vendor_gems end ohai "bundle install --standalone" - safe_system_redirect_stdout_to_stderr "bundle", "install", "--standalone" + safe_system "bundle", "install", "--standalone" ohai "bundle pristine" safe_system "bundle", "pristine"
true
Other
Homebrew
brew
c4d69dd2e903f7faa810da59cf4b307bd8cdd116.json
Revert "fix(vendor-gems): redirect bundler stdout to stderr"
Library/Homebrew/utils.rb
@@ -332,19 +332,6 @@ def quiet_system(cmd, *args) end end - # Redirects stdout to stderr, throws exception on command failure. - def safe_system_redirect_stdout_to_stderr(cmd, *args) - return if Homebrew._system(cmd, *args) do - # Redirect stdout stream to stderr stream. This is useful to prevent - ...
true
Other
Homebrew
brew
c4d69dd2e903f7faa810da59cf4b307bd8cdd116.json
Revert "fix(vendor-gems): redirect bundler stdout to stderr"
Library/Homebrew/utils/gems.rb
@@ -144,9 +144,7 @@ def install_bundler_gems!(only_warn_on_failure: false, setup_path: true) # for some reason sometimes the exit code lies so check the output too. if bundle_check_failed || bundle_check_output.include?("Install missing gems") - begin - safe_system_redirect_stdout_to_std...
true
Other
Homebrew
brew
e7ef5f949daf3a9f1d1ead0e70baa8062a637400.json
Update RBI files for concurrent-ruby.
Library/Homebrew/sorbet/rbi/gems/concurrent-ruby@1.1.9.rbi
@@ -1,16 +1,15 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `concurrent-ruby` gem. -# Please instead update this file by running `tapioca sync`. +# Please instead update this file by running `bin/tapioca sync`. # typed: true module Concurrent - extend(::Concurrent::Util...
true
Other
Homebrew
brew
e7ef5f949daf3a9f1d1ead0e70baa8062a637400.json
Update RBI files for concurrent-ruby.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -6213,14 +6213,6 @@ class CompilerSelector extend ::T::Private::Methods::SingletonMethodHooks end -class Concurrent::Promises::AbstractEventFuture - include ::Concurrent::Promises::InternalStates -end - -module Concurrent::Promises::Resolvable - include ::Concurrent::Promises::InternalStates -end - class Co...
true
Other
Homebrew
brew
34a3cd00cdee6b6f7ee25aa6a9fa5084eafb1337.json
Update RBI files for rubocop-sorbet.
Library/Homebrew/sorbet/rbi/gems/rubocop-sorbet@0.6.2.rbi
@@ -1,17 +1,12 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rubocop-sorbet` gem. -# Please instead update this file by running `tapioca sync`. +# Please instead update this file by running `bin/tapioca sync`. # typed: true -module RuboCop -end - -module RuboCop::Cop -end...
false
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
Library/Homebrew/dev-cmd/generate-man-completions.rb
@@ -67,6 +67,7 @@ def build_man_page(quiet:) generate_cmd_manpages(Commands.official_external_commands_paths(quiet: quiet)) variables[:global_cask_options] = global_cask_options_manpage variables[:global_options] = global_options_manpage + variables[:terminology] = terminology_manpage variables...
true
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
Library/Homebrew/manpages/brew.1.md.erb
@@ -137,6 +137,10 @@ And for an authenticated HTTP proxy: export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT +## TERMINOLOGY + +<%= terminology %> + ## SEE ALSO Homebrew Documentation: <https://docs.brew.sh>
true
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
docs/Formula-Cookbook.md
@@ -8,7 +8,7 @@ A *formula* is a package definition written in Ruby. It can be created with `bre |----------------|------------------------------------------------------------|-----------------------------------------------------------------| | **Formula** | The package definition ...
true
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
docs/Manpage.md
@@ -2052,6 +2052,24 @@ And for an authenticated HTTP proxy: export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT +## TERMINOLOGY + +**Formula**: The package definition (e.g. `/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/foo.rb`) + +**Keg**: The installation prefix of a **Formula** (e.g. `/us...
true
Other
Homebrew
brew
144c1c68c343b9f7bef14ed4ee3f4698d98e6af6.json
docs: add terminology to manpage
manpages/brew.1
@@ -2988,6 +2988,38 @@ export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT . .IP "" 0 . +.SH "TERMINOLOGY" +\fBFormula\fR + The package definition (e\.g\. \fB/usr/local/Homebrew/Library/Taps/homebrew/homebrew\-core/Formula/foo\.rb\fR) +. +.P +\fBKeg\fR + The installation prefix of a \fBFormula\fR (e\.g\. \fB/...
true
Other
Homebrew
brew
d60f549a483a1a0d1f7061f8b8f1a68fc39ad8c4.json
info: add `--bottle` option for JSON bottle info
Library/Homebrew/cmd/info.rb
@@ -50,6 +50,9 @@ def info_args description: "Print a JSON representation. Currently the default value for <version> is `v1` for "\ "<formula>. For <formula> and <cask> use `v2`. See the docs for examples of using the "\ "JSON output: <https://docs.bre...
true
Other
Homebrew
brew
d60f549a483a1a0d1f7061f8b8f1a68fc39ad8c4.json
info: add `--bottle` option for JSON bottle info
Library/Homebrew/formula.rb
@@ -1910,7 +1910,7 @@ def to_hash # @api private # Generate a hash to be used to install a formula from a JSON file - def to_bottle_hash(top_level: true) + def to_recursive_bottle_hash(top_level: true) bottle = bottle_hash bottles = bottle["files"].map do |tag, file| @@ -1923,9 +1923,14 @@ def to_...
true
Other
Homebrew
brew
d60f549a483a1a0d1f7061f8b8f1a68fc39ad8c4.json
info: add `--bottle` option for JSON bottle info
Library/Homebrew/test/formula_spec.rb
@@ -871,7 +871,7 @@ expect(h["versions"]["bottle"]).to be_truthy end - specify "#to_bottle_hash" do + specify "#to_recursive_bottle_hash" do f1 = formula "foo" do url "foo-1.0" @@ -881,9 +881,10 @@ end end - h = f1.to_bottle_hash + h = f1.to_recursive_bottle_hash exp...
true
Other
Homebrew
brew
8250f733839aaf98578398dac035f79511144913.json
service: add install block to unit
Library/Homebrew/service.rb
@@ -151,6 +151,9 @@ def to_systemd_unit [Unit] Description=Homebrew generated unit for #{@formula.name} + [Install] + WantedBy=multi-user.target + [Service] Type=simple ExecStart=#{command.join(" ")}
true
Other
Homebrew
brew
8250f733839aaf98578398dac035f79511144913.json
service: add install block to unit
Library/Homebrew/test/service_spec.rb
@@ -123,6 +123,9 @@ [Unit] Description=Homebrew generated unit for formula_name + [Install] + WantedBy=multi-user.target + [Service] Type=simple ExecStart=#{HOMEBREW_PREFIX}/opt/#{name}/bin/beanstalkd test @@ -146,6 +149,9 @@ [Unit] Descript...
true
Other
Homebrew
brew
ccfd01ba389ed638f0c67bbf82e01b3108314449.json
Strategy: Replace open-uri with curl
Library/Homebrew/livecheck/strategy.rb
@@ -100,7 +100,8 @@ def self.page_headers(url) *args, url, print_stdout: false, print_stderr: false, debug: false, verbose: false, - user_agent: user_agent, retry: false + user_agent: user_agent, timeout: 20, + retry: false ) ...
true
Other
Homebrew
brew
ccfd01ba389ed638f0c67bbf82e01b3108314449.json
Strategy: Replace open-uri with curl
Library/Homebrew/livecheck/strategy/page_match.rb
@@ -1,8 +1,6 @@ # typed: true # frozen_string_literal: true -require "open-uri" - module Homebrew module Livecheck module Strategy
true
Other
Homebrew
brew
8b0f7e7ada254c8b2a046776174b6ff1b80a5499.json
formula: add `to_bottle_hash` method
Library/Homebrew/formula.rb
@@ -1908,6 +1908,27 @@ def to_hash hsh end + # @api private + # Generate a hash to be used to install a formula from a JSON file + def to_bottle_hash(top_level: true) + bottle = bottle_hash + + bottles = bottle["files"].map do |tag, file| + info = { + "url" => file["url"], + "sh...
true
Other
Homebrew
brew
8b0f7e7ada254c8b2a046776174b6ff1b80a5499.json
formula: add `to_bottle_hash` method
Library/Homebrew/test/formula_spec.rb
@@ -871,6 +871,25 @@ expect(h["versions"]["bottle"]).to be_truthy end + specify "#to_bottle_hash" do + f1 = formula "foo" do + url "foo-1.0" + + bottle do + sha256 cellar: :any, Utils::Bottles.tag.to_sym => TEST_SHA256 + sha256 cellar: :any, foo: TEST_SHA256...
true
Other
Homebrew
brew
07d571bebc5b05a86e5dc8ebf9c51ec9836da81d.json
fix(vendor-gems): redirect bundler stdout to stderr When running brew commands and interpreting the output, e.g. running `brew livecheck --json`, it's necessary to stop other programs Homebrew happens to execute from writing logging output to stdout. Most programs don't do this, but `bundle install` does seem to. To ...
Library/Homebrew/dev-cmd/vendor-gems.rb
@@ -40,7 +40,7 @@ def vendor_gems end ohai "bundle install --standalone" - safe_system "bundle", "install", "--standalone" + safe_system_redirect_stdout_to_stderr "bundle", "install", "--standalone" ohai "bundle pristine" safe_system "bundle", "pristine"
true
Other
Homebrew
brew
07d571bebc5b05a86e5dc8ebf9c51ec9836da81d.json
fix(vendor-gems): redirect bundler stdout to stderr When running brew commands and interpreting the output, e.g. running `brew livecheck --json`, it's necessary to stop other programs Homebrew happens to execute from writing logging output to stdout. Most programs don't do this, but `bundle install` does seem to. To ...
Library/Homebrew/utils.rb
@@ -332,6 +332,19 @@ def quiet_system(cmd, *args) end end + # Redirects stdout to stderr, throws exception on command failure. + def safe_system_redirect_stdout_to_stderr(cmd, *args) + return if Homebrew._system(cmd, *args) do + # Redirect stdout stream to stderr stream. This is useful to prevent + ...
true
Other
Homebrew
brew
07d571bebc5b05a86e5dc8ebf9c51ec9836da81d.json
fix(vendor-gems): redirect bundler stdout to stderr When running brew commands and interpreting the output, e.g. running `brew livecheck --json`, it's necessary to stop other programs Homebrew happens to execute from writing logging output to stdout. Most programs don't do this, but `bundle install` does seem to. To ...
Library/Homebrew/utils/gems.rb
@@ -144,7 +144,9 @@ def install_bundler_gems!(only_warn_on_failure: false, setup_path: true) # for some reason sometimes the exit code lies so check the output too. if bundle_check_failed || bundle_check_output.include?("Install missing gems") - unless system bundle, "install" + begin + ...
true
Other
Homebrew
brew
141edc8506ef72f5b8700d59c72615517964a0b7.json
formula_auditor: add audit for elasticsearch and kibana Prevent upgrading them to version 7.11 or newer, as they were relicensed to an incompatible license.
Library/Homebrew/formula_auditor.rb
@@ -353,6 +353,17 @@ def audit_glibc "which allows them to use our Linux bottles, which were compiled against system Glibc on CI." end + ELASTICSEARCH_KIBANA_RELICENSED_VERSION = "7.11" + + def audit_elasticsearch_kibana + return if formula.name != "elasticsearch" && formula.name != "ki...
false
Other
Homebrew
brew
cb78499cd4b96fa00b51d235e0dd2ea61ec20336.json
Install build deps for `--HEAD`
Library/Homebrew/formula_installer.rb
@@ -592,7 +592,7 @@ def expand_dependencies keep_build_test = false keep_build_test ||= dep.test? && include_test? && @include_test_formulae.include?(dependent.full_name) - keep_build_test ||= dep.build? && !install_bottle_for?(dependent, build) && !dependent.latest_version_installed? + keep_b...
false
Other
Homebrew
brew
c7bbb904e8f83b08fe8d10913e37298fa7a03386.json
diagnostic: add check for broken taps Detect half-baked core taps that show up on a fairly regular basis (e.g. #11465). The logic is simple enough: Since an improper tap wouldn't have a complete Git config, and is always somewhere below `HOMEBREW_REPOSITORY`, any Git operation would look at the Brew repo instead. We ...
Library/Homebrew/diagnostic.rb
@@ -147,6 +147,27 @@ def examine_git_origin(repository_path, desired_origin) end end + def broken_tap_msg(tap) + <<~EOS + #{tap.full_name} was not tapped properly. + To fix: + rm -rf "#{tap.path}" + brew tap #{tap.name} + EOS + end + + ...
false
Other
Homebrew
brew
7d8723d8857b207814b31d813568e586e2c692c1.json
Update RBI files for rubocop-ast.
Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.7.0.rbi
@@ -675,6 +675,7 @@ end class RuboCop::AST::InPatternNode < ::RuboCop::AST::Node def body; end def branch_index; end + def pattern; end def then?; end end @@ -757,7 +758,8 @@ module RuboCop::AST::MethodDispatchNode def block_node; end def command?(name); end def const_receiver?; end - def def_mo...
false
Other
Homebrew
brew
40b39151f916e612c1fc7efe259b3fc28efe7336.json
rename the variable
Library/Homebrew/diagnostic.rb
@@ -679,17 +679,17 @@ def check_git_status message = nil - taps = { + repos = { "Homebrew/brew" => HOMEBREW_REPOSITORY, "Homebrew/homebrew-core" => CoreTap.instance.path, } %w[cask cask-drivers cask-fonts cask-versions].each do |tap| ...
false
Other
Homebrew
brew
ca6fc4873e4cb396e9ff650a52853ccd2359ac47.json
audit_spec: expect error for uppercase formula Our docs state that formula filenames must not have uppercase letters. This adds a test to expect that FormulaAuditor's audit_formula_name method complains about such a formula.
Library/Homebrew/test/dev-cmd/audit_spec.rb
@@ -488,6 +488,32 @@ class Foo < Formula end end + describe "#audit_formula_name" do + specify "no issue" do + fa = formula_auditor "foo", <<~RUBY, core_tap: true, strict: true + class Foo < Formula + url "https://brew.sh/foo-1.0.tgz" + homepage "https://brew....
false
Other
Homebrew
brew
d2b74b3e21e8be9422cb92a90ada9814729156f8.json
Update RBI files for rubocop-ast.
Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.6.0.rbi
@@ -4,11 +4,273 @@ # typed: true -module RuboCop +class AST::Node + def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end + + def +(array); end + def <<(element); end + def ==(other); end + def append(element); end + def children; end + def clone; end + def concat(array); end + d...
true
Other
Homebrew
brew
d2b74b3e21e8be9422cb92a90ada9814729156f8.json
Update RBI files for rubocop-ast.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -26784,7 +26784,6 @@ end module RuboCop::AST::NodePattern::Sets SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) - SET_DEFINE_METHOD = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_SYSTEM_SH...
true
Other
Homebrew
brew
3e70d7becc27035144f20b5ae8b21278ded3aa50.json
Update RBI files for nokogiri.
Library/Homebrew/sorbet/rbi/gems/nokogiri@1.11.6.rbi
@@ -119,13 +119,9 @@ class Nokogiri::CSS::Parser < ::Racc::Parser end Nokogiri::CSS::Parser::CACHE_SWITCH_NAME = T.let(T.unsafe(nil), Symbol) - Nokogiri::CSS::Parser::Racc_arg = T.let(T.unsafe(nil), Array) - Nokogiri::CSS::Parser::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) - -class Nokogiri::CSS::SyntaxE...
false
Other
Homebrew
brew
bf64de2ad690aca471b41442eea18e4a6dbc8ab8.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.23.rbi
@@ -870,6 +870,9 @@ class Tapioca::Compilers::SymbolTable::SymbolGenerator sig { params(tree: Tapioca::RBI::Tree, symbol: String).void } def generate_from_symbol(tree, symbol); end + sig { params(constant: T.all(Module, T::Generic)).returns(String) } + def generic_name_of(constant); end + sig { params(cons...
false
Other
Homebrew
brew
3ce5737425488d0199a0146af7d85ae448221a13.json
service: ensure environment variables are strings
Library/Homebrew/service.rb
@@ -135,13 +135,11 @@ def run_type(type = nil) end end - sig { params(variables: T.nilable(T::Hash[String, String])).returns(T.nilable(T::Hash[String, String])) } + sig { params(variables: T::Hash[String, String]).returns(T.nilable(T::Hash[String, String])) } def environment_variables(variables...
true
Other
Homebrew
brew
3ce5737425488d0199a0146af7d85ae448221a13.json
service: ensure environment variables are strings
Library/Homebrew/test/service_spec.rb
@@ -69,7 +69,7 @@ f.class.service do run [opt_bin/"beanstalkd", "test"] run_type :immediate - environment_variables PATH: std_service_path_env, FOO: "BAR" + environment_variables PATH: std_service_path_env, FOO: "BAR", ETC_DIR: etc/"beanstalkd" error_log_path var/"log/bea...
true
Other
Homebrew
brew
e29b2caee03a2749c976e08ab99bfc137747e535.json
service: define paths as expecting Pathname or string Co-authored-by: Rylan Polster <rslpolster@gmail.com>
Library/Homebrew/service.rb
@@ -55,7 +55,7 @@ def root_dir(path = nil) when String, Pathname @root_dir = path.to_s else - raise TypeError, "Service#root_dir expects a String" + raise TypeError, "Service#root_dir expects a String or Pathname" end end @@ -67,7 +67,7 @@ def input_path(path = nil) ...
false
Other
Homebrew
brew
b81a522230b8166d0a5409095ab43d2cae75bbb8.json
Add tests for `to_latest_kegs`
Library/Homebrew/test/cli/named_args_spec.rb
@@ -218,6 +218,24 @@ def setup_unredable_cask(name) end end + describe "#to_latest_kegs" do + before do + (HOMEBREW_CELLAR/"foo/1.0").mkpath + (HOMEBREW_CELLAR/"foo/2.0").mkpath + (HOMEBREW_CELLAR/"bar/1.0").mkpath + end + + it "resolves the latest kegs with #resolve_latest_keg" do + ...
false
Other
Homebrew
brew
fceaa2bb74d7beac30afe5fcf21c4d10e8ef53fa.json
Service: add additional options
Library/Homebrew/service.rb
@@ -47,6 +47,30 @@ def working_dir(path = nil) end end + sig { params(path: T.nilable(T.any(String, Pathname))).returns(T.nilable(String)) } + def root_dir(path = nil) + case T.unsafe(path) + when nil + @root_dir + when String, Pathname + @root_dir = path.to_s + els...
true
Other
Homebrew
brew
fceaa2bb74d7beac30afe5fcf21c4d10e8ef53fa.json
Service: add additional options
Library/Homebrew/test/service_spec.rb
@@ -40,8 +40,12 @@ environment_variables PATH: std_service_path_env error_log_path var/"log/beanstalkd.error.log" log_path var/"log/beanstalkd.log" + input_path var/"in/beanstalkd" + root_dir var working_dir var keep_alive true + restart_delay 30 + ...
true
Other
Homebrew
brew
1182440f80ff665566e965e90d195195ebba6e8a.json
livecheck/strategy/sparkle: install bundler gems
Library/Homebrew/livecheck/strategy/sparkle.rb
@@ -57,6 +57,7 @@ def self.match?(url) sig { params(content: String).returns(T.nilable(Item)) } def self.item_from_content(content) + Homebrew.install_bundler_gems! require "nokogiri" xml = Nokogiri::XML(content)
false
Other
Homebrew
brew
31ce4c8b4fd60e6c1436cd4c8200af9e0353298f.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.21.rbi
@@ -1,609 +0,0 @@ -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `tapioca` gem. -# Please instead update this file by running `bin/tapioca sync`. - -# typed: true - -module T::Generic::TypeStoragePatch - def [](*types); end - def type_member(variance = T.unsafe(nil), fixed: T.uns...
true
Other
Homebrew
brew
31ce4c8b4fd60e6c1436cd4c8200af9e0353298f.json
Update RBI files for tapioca.
Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.22.rbi
@@ -0,0 +1,1814 @@ +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `tapioca` gem. +# Please instead update this file by running `bin/tapioca sync`. + +# typed: true + +class Parlour::Generator + sig { params(break_params: Integer, tab_size: Integer, sort_namespaces: T::Boolean).voi...
true
Other
Homebrew
brew
fcc3c4f84d005a43f33db3ce536350ff1c25c4ae.json
Update RBI files for nokogiri.
Library/Homebrew/sorbet/rbi/gems/nokogiri@1.11.5.rbi
@@ -581,6 +581,8 @@ Nokogiri::LIBXML_ICONV_ENABLED = T.let(T.unsafe(nil), TrueClass) Nokogiri::LIBXML_LOADED_VERSION = T.let(T.unsafe(nil), String) +Nokogiri::LIBXML_MEMORY_MANAGEMENT = T.let(T.unsafe(nil), String) + Nokogiri::LIBXSLT_COMPILED_VERSION = T.let(T.unsafe(nil), String) Nokogiri::LIBXSLT_LOADED_VER...
false
Other
Homebrew
brew
08bbb95cfba4ba755fc45e427b33802fab9e9cc1.json
Add `to_kegs` test
Library/Homebrew/test/cli/named_args_spec.rb
@@ -176,6 +176,26 @@ def setup_unredable_cask(name) end end + describe "#to_kegs" do + before do + (HOMEBREW_CELLAR/"foo/1.0").mkpath + (HOMEBREW_CELLAR/"foo/2.0").mkpath + (HOMEBREW_CELLAR/"bar/1.0").mkpath + end + + it "resolves kegs with #resolve_kegs" do + expect(described_cl...
false
Other
Homebrew
brew
ddcb0519b6740eb4147e7520de424e895c0318bc.json
feat: add branch param
Library/Homebrew/dev-cmd/pr-publish.rb
@@ -19,6 +19,8 @@ def pr_publish_args switch "--autosquash", description: "If supported on the target tap, automatically reformat and reword commits "\ "in the pull request to our preferred format." + flag "--branch=", + description: "Branch to publish ...
false
Other
Homebrew
brew
6bcb3bd3678f3975e79a4688a1766ad940b5cfc4.json
docs: clarify link to above section
docs/Homebrew-brew-Maintainer-Guide.md
@@ -60,7 +60,7 @@ There are many checks that run on every PR. The following is a quick list of the any new/changed dependencies. See [Type Checking With Sorbet](Typechecking.md) for more information about RBI files and typechecking. - `Triage / review`: This verifies that the PR has been open for long enough. - ...
false
Other
Homebrew
brew
ac6b4dbe6e6921f6cb33fbbd87d4f39416a6af90.json
docs: update new maintainer checklist
docs/New-Maintainer-Checklist.md
@@ -26,28 +26,24 @@ contribute to Homebrew, but we will ask you to step down as a maintainer. A few requests: -- Please make pull requests on any changes to Homebrew/brew code or any - non-trivial (e.g. not a test or audit improvement or version bump) changes - to formulae code and don't merge them unless you ge...
false
Other
Homebrew
brew
847d7a233d611992e07228089a1d79e261c1f6d7.json
Update RBI files for rubocop.
Library/Homebrew/sorbet/rbi/gems/rubocop@1.15.0.rbi
@@ -943,6 +943,7 @@ module RuboCop::Cop::CheckLineBreakable def extract_first_element_over_column_limit(node, elements, max); end def process_args(args); end def safe_to_ignore?(node); end + def shift_elements_for_heredoc_arg(node, elements, index); end def within_column_limit?(element, max, line); end en...
true
Other
Homebrew
brew
847d7a233d611992e07228089a1d79e261c1f6d7.json
Update RBI files for rubocop.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -26784,6 +26784,7 @@ end module RuboCop::AST::NodePattern::Sets SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped) + SET_DEFINE_METHOD = ::T.let(nil, ::T.untyped) SET_DEPENDS_ON_USES_FROM_MACOS = ::T.let(nil, ::T.untyped) SET_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped) SET_SYSTEM_SH...
true
Other
Homebrew
brew
69e29a358bb1bdea66db3d02e852a4858a11becd.json
Raise errors on invalid symbol/block combinations
Library/Homebrew/formula.rb
@@ -2924,8 +2924,13 @@ def service(&block) def pour_bottle?(reason: nil, &block) @pour_bottle_check = PourBottleCheck.new(self) - if reason == :clt_required - block = lambda do |_| + if reason.present? && block.present? + raise ArgumentError, "Do not pass both a reason and a block ...
true
Other
Homebrew
brew
69e29a358bb1bdea66db3d02e852a4858a11becd.json
Raise errors on invalid symbol/block combinations
Library/Homebrew/test/formula_spec.rb
@@ -1021,6 +1021,29 @@ def pour_bottle? expect(f).to pour_bottle end + + it "throws an error if passed both a symbol and a block" do + expect do + formula "foo" do + url "foo-1.0" + + pour_bottle? reason: :clt_required do + reason "true reason" + sati...
true
Other
Homebrew
brew
212b64836f6e0fe76e11169caf8c6db7a12f34c7.json
Update usage message
Library/Homebrew/cmd/link.rb
@@ -27,7 +27,7 @@ def link_args switch "-f", "--force", description: "Allow keg-only formulae to be linked." switch "--HEAD", - description: "If it is installed, link the HEAD version." + description: "Link the HEAD version of the formula if it is installed." ...
false
Other
Homebrew
brew
fb3bfbb65c75227abce523aa2446c3e8f390e3da.json
Remove prefix option and add reason argument name
Library/Homebrew/formula.rb
@@ -2920,21 +2920,12 @@ def service(&block) # the {Formula} will be built from source and `reason` will be printed. # # Alternatively, a preset reason can be passed as a symbol: - # <pre>pour_bottle? :default_prefix_required</pre> - # <pre>pour_bottle? :clt_required</pre> - def pour_bottle?(requ...
true
Other
Homebrew
brew
fb3bfbb65c75227abce523aa2446c3e8f390e3da.json
Remove prefix option and add reason argument name
Library/Homebrew/test/formula_spec.rb
@@ -997,26 +997,26 @@ def pour_bottle? end it "returns false when set with a symbol" do - # Ensure that prefix does not match the default - stub_const "Homebrew::DEFAULT_PREFIX", "foo" + # Pretend CLT is not installed + allow(MacOS::CLT).to receive(:installed?).and_return(false) ...
true
Other
Homebrew
brew
e8b5eb7e42c925b7cc10c78a029b8c70e4d7965b.json
extend/os/mac/keg_relocate: fix relocation of duplicate `RPATH`s Homebrew/homebrew-core#77623 revealed two bugs. One in `ruby-macho`, which turns out to be unable to delete duplicated `RPATH`s. This was fixed with `ruby-macho` 2.5.1. The second, which this commit fixes, is in our handling of duplicate `RPATH`s. Since...
Library/Homebrew/extend/os/mac/keg_relocate.rb
@@ -94,6 +94,7 @@ def fixed_name(file, bad_name) def each_linkage_for(file, linkage_type, &block) links = file.method(linkage_type) .call + .uniq .reject { |fn| fn =~ /^@(loader_|executable_|r)path/ } links.each(&block) end
false
Other
Homebrew
brew
41baec1a497ba0da1e1e28d55b8d8a197ff7ceb5.json
Update RBI files for ruby-macho.
Library/Homebrew/sorbet/rbi/gems/ruby-macho@2.5.1.rbi
@@ -1,6 +1,6 @@ # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `ruby-macho` gem. -# Please instead update this file by running `tapioca sync`. +# Please instead update this file by running `bin/tapioca sync`. # typed: true
false
Other
Homebrew
brew
5e9fcafbd8af57a5166c105f8aab3ca38edcfa63.json
formula: add preset `pour_bottle?` symbols
Library/Homebrew/formula.rb
@@ -2918,8 +2918,34 @@ def service(&block) # # If `satisfy` returns `false` then a bottle will not be used and instead # the {Formula} will be built from source and `reason` will be printed. - def pour_bottle?(&block) + # + # Alternatively, a preset reason can be passed as a symbol: + # <pre>...
true
Other
Homebrew
brew
5e9fcafbd8af57a5166c105f8aab3ca38edcfa63.json
formula: add preset `pour_bottle?` symbols
Library/Homebrew/test/formula_spec.rb
@@ -995,6 +995,31 @@ def pour_bottle? expect(f).to pour_bottle end + + it "returns false when set with a symbol" do + f = formula "foo" do + url "foo-1.0" + + pour_bottle? :default_prefix_required + end + + # Homebrew::DEFAULT_PREFIX is still /usr/local or /opt/homebrew + ...
true
Other
Homebrew
brew
a079ba9bb389de0d4a849042f45dad6d9ccd31d9.json
Add parentheses for clarity
Library/Homebrew/utils/curl.rb
@@ -138,7 +138,7 @@ def curl_download(*args, to: nil, try_partial: true, **options) # Any value for `accept-ranges` other than none indicates that the server supports partial requests. # Its absence indicates no support. - supports_partial = headers.key? "accept-ranges" && headers["accept-ran...
false
Other
Homebrew
brew
a1566212976072d8b5b95f5b335a3d98f77c713d.json
Simplify header parsing
Library/Homebrew/utils/curl.rb
@@ -121,10 +121,8 @@ def curl(*args, print_stdout: true, **options) def parse_headers(headers) return {} unless headers - headers.split("\n").to_h do |h| - partitioned = h.partition(": ") - [partitioned.first, partitioned.last] - end + # Skip status code + headers.split("...
false
Other
Homebrew
brew
5f62f417fd1b86bb664afa364d2af2972bb489d6.json
add error message that cask was installed manually
Library/Homebrew/cask/cmd/upgrade.rb
@@ -97,6 +97,11 @@ def self.upgrade_casks( cask.artifacts.any?(Artifact::Installer::ManualInstaller) end + if manual_installer_casks.present? + ofail "Not upgrading #{manual_installer_casks.count} casks because they was install manually" + puts manual_installer_casks.map(&...
false
Other
Homebrew
brew
16e707254391d50de331489d42ed5c36e4b0c722.json
Fix argument order
Library/Homebrew/utils/curl.rb
@@ -119,6 +119,8 @@ def curl(*args, print_stdout: true, **options) end def parse_headers(headers) + return {} unless headers + headers.split("\n").to_h do |h| partitioned = h.partition(": ") [partitioned.first, partitioned.last] @@ -145,10 +147,9 @@ def curl_download(*args, to:...
false
Other
Homebrew
brew
df0915e33f554cf0139e83359cae867393d31b6f.json
Check partial request support with Accept-Ranges
Library/Homebrew/utils/curl.rb
@@ -130,23 +130,22 @@ def curl_download(*args, to: nil, try_partial: true, **options) destination.dirname.mkpath if try_partial - range_stdout = curl_output("--location", "--range", "0-1", - "--dump-header", "-", - "--write-out",...
false
Other
Homebrew
brew
b9b917756c6408f20a341fe47fe0385d067f14d1.json
Add header parsing
Library/Homebrew/utils/curl.rb
@@ -118,6 +118,13 @@ def curl(*args, print_stdout: true, **options) result end + def parse_headers(headers) + headers.split("\n").to_h do |h| + partitioned = h.partition(": ") + [partitioned.first, partitioned.last] + end + end + def curl_download(*args, to: nil, try_par...
false
Other
Homebrew
brew
aa989bd55a2013c9858e19455c700b707d65021e.json
Change inititial partial request to HEAD request
Library/Homebrew/utils/curl.rb
@@ -118,15 +118,15 @@ def curl(*args, print_stdout: true, **options) result end - def curl_download(*args, to: nil, partial: true, **options) + def curl_download(*args, to: nil, try_partial: true, **options) destination = Pathname(to) destination.dirname.mkpath - if partial + ...
false
Other
Homebrew
brew
73ca9a0e05efa24c9e26011271729589d48e481b.json
docs: add cask cookbook link to maintainer guidlines
docs/Maintainer-Guidelines.md
@@ -5,7 +5,7 @@ access** to Homebrew’s repository and help merge the contributions of others. You may find what is written here interesting, but it’s definitely not a beginner’s guide. -Maybe you were looking for the [Formula Cookbook](Formula-Cookbook.md)? +Maybe you were looking for the [Formula Cookbook](Formula...
false
Other
Homebrew
brew
0f472906222c16c4d33265446cb5ddcc0c41e788.json
docs: add cask maintainer guide
docs/Cask-Maintainer-Guide.md
@@ -0,0 +1,59 @@ +# Cask Maintainer Guide + +This guide is intended to help maintainers effectively maintain the cask repositories. +It is meant to be used in conjunction with the more generic [Maintainer Guidelines](Maintainer-Guidelines.md). + +This guide applies to all four of the cask repositories: + +- [Homebrew/h...
true
Other
Homebrew
brew
0f472906222c16c4d33265446cb5ddcc0c41e788.json
docs: add cask maintainer guide
docs/README.md
@@ -66,6 +66,7 @@ - [Releases](Releases.md) - [Developer/Internal API Documentation](https://rubydoc.brew.sh) - [Homebrew/homebrew-core merge checklist](Homebrew-homebrew-core-Merge-Checklist.md) +- [Cask Maintainer Guide](Cask-Maintainer-Guide.md) ## Governance
true
Other
Homebrew
brew
c7de544fe8b7671a02399b895abfdeb8823f982c.json
extend/os/mac/keg_relocate: fix post-bottling dylib ID relocation Running `brew bottle` changes dylib IDs, install names, and rpaths into placeholders for the bottle, creates a bottle tarball, and then changes the placeholders back to their correct values. With my refactoring in #11358, the behaviour of this relocati...
Library/Homebrew/extend/os/mac/keg_relocate.rb
@@ -22,8 +22,8 @@ def relocate_dynamic_linkage(relocation) mach_o_files.each do |file| file.ensure_writable do if file.dylib? - id = relocated_name_for(dylib_id_for(file), relocation) - change_dylib_id(id, file) if id + id = relocated_name_for(file.dylib_id, relocation) +...
false
Other
Homebrew
brew
706c40869662c0ddf18d3a6bb62b25740ddbee4e.json
Add leaves flags tests
Library/Homebrew/test/cmd/leaves_spec.rb
@@ -44,4 +44,27 @@ .and be_a_success end end + + context "when there are installed formulae with dependencies", :integration_test do + it "prints leaves installed as dependencies with --installed-as-dependency" do + setup_test_formula "testball" + install_test_formula "testball1", 'depend...
false
Other
Homebrew
brew
8764c4fc21890087bcfde8daac714fce46c4ada8.json
Fix proc coercion
Library/Homebrew/cmd/leaves.rb
@@ -37,8 +37,8 @@ def leaves leaves_list = Formula.installed_formulae_with_no_dependents - leaves_list.select!(&:installed_on_request?) if args.installed_on_request? - leaves_list.select!(&:installed_as_dependency?) if args.installed_as_dependency? + leaves_list.select!(&method(:installed_on_request?)...
false
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/.rubocop.yml
@@ -54,6 +54,10 @@ FormulaAudit: FormulaAuditStrict: Enabled: true +# enable all Homebrew custom cops +Homebrew: + Enabled: true + # makes DSL usage ugly. Layout/SpaceBeforeBrackets: Exclude:
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/rubocops.rb
@@ -12,6 +12,7 @@ require "rubocop-rspec" require "rubocop-sorbet" +require "rubocops/io_read" require "rubocops/shell_commands" require "rubocops/formula_desc"
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/rubocops/io_read.rb
@@ -0,0 +1,35 @@ +# typed: true +# frozen_string_literal: true + +module RuboCop + module Cop + module Homebrew + # This cop restricts usage of IO.read functions for security reasons. + # + # @api private + class IORead < Base + MSG = "The use of `IO.%<method>s` is a security risk." + ...
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/rubocops/shell_commands.rb
@@ -6,7 +6,7 @@ module RuboCop module Cop - module Style + module Homebrew # https://github.com/ruby/ruby/blob/v2_6_3/process.c#L2430-L2460 SHELL_BUILTINS = %w[ !
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/test/rubocops/io_read_spec.rb
@@ -0,0 +1,75 @@ +# typed: false +# frozen_string_literal: true + +require "rubocops/io_read" + +describe RuboCop::Cop::Homebrew::IORead do + subject(:cop) { described_class.new } + + it "reports an offense when `IO.read` is used with a pipe character" do + expect_offense(<<~RUBY) + IO.read("|echo test") + ...
true
Other
Homebrew
brew
e5285b5ed8d1ca7c653819a1d1023d4affda4072.json
Add cop for IO.read usage
Library/Homebrew/test/rubocops/shell_commands_spec.rb
@@ -5,7 +5,7 @@ module RuboCop module Cop - module Style + module Homebrew describe ShellCommands do subject(:cop) { described_class.new }
true
Other
Homebrew
brew
09505496291e73c1d2ae7f0f07ea7dc98bbcda5f.json
os/mac: use perl 5.18 on Catalina
Library/Homebrew/os/mac.rb
@@ -64,8 +64,6 @@ def prerelease? def preferred_perl_version if version >= :big_sur "5.30" - elsif version == :catalina - "5.28" else "5.18" end
false
Other
Homebrew
brew
09a996181d7233543f6adbf190685d89d349b35b.json
sorbet: Update RBI files. Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow.
Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi
@@ -9726,9 +9726,8 @@ class Keg::DirectoryNotWritableError end class Keg::Relocation - def self.[](*_); end - - def self.members(); end + extend ::T::Private::Methods::MethodHooks + extend ::T::Private::Methods::SingletonMethodHooks end class Keg
false
Other
Homebrew
brew
6e2f194e0933c82246eb84aa0fd7283832bc435e.json
rubocops/shell_commands: add cop for shell metacharacters in `exec`
Library/Homebrew/rubocops/shared/helper_functions.rb
@@ -54,15 +54,15 @@ def source_buffer(node) end # Returns the string representation if node is of type str(plain) or dstr(interpolated) or const. - def string_content(node) + def string_content(node, strip_dynamic: false) case node.type when :str node.str_content ...
true