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
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/formula.rb
@@ -1088,7 +1088,7 @@ def skip_clean?(path) end # Sometimes we accidentally install files outside prefix. After we fix that, - # users will get nasty link conflict error. So we create a whitelist here to + # users will get nasty link conflict error. So we create an allowlist here to # allow overwriting cer...
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/rubocops/components_order.rb
@@ -11,7 +11,7 @@ module FormulaAudit # where each sub array contains components' details which are at same precedence level class ComponentsOrder < FormulaCop # `aspell`: options and resources should be grouped by language - COMPONENT_WHITELIST = %w[ + COMPONENT_ALLOWLIST = %w[ ...
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/rubocops/conflicts.rb
@@ -11,14 +11,14 @@ class Conflicts < FormulaCop MSG = "Versioned formulae should not use `conflicts_with`. " \ "Use `keg_only :versioned_formula` instead." - WHITELIST = %w[ + ALLOWLIST = %w[ bash-completion@2 ].freeze def audit_formula(_node, _cla...
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/rubocops/keg_only.rb
@@ -10,7 +10,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node) keg_only_node = find_node_method_by_name(body_node, :keg_only) return unless keg_only_node - whitelist = %w[ + allowlist = %w[ Apple macOS OS @@ -27,7 +...
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/rubocops/lines.rb
@@ -457,7 +457,7 @@ def modifier?(node) module FormulaAuditStrict class MakeCheck < FormulaCop - MAKE_CHECK_WHITELIST = %w[ + MAKE_CHECK_ALLOWLIST = %w[ beecrypt ccrypt git @@ -483,7 +483,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_nod...
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/rubocops/urls.rb
@@ -8,7 +8,7 @@ module FormulaAudit # This cop audits URLs and mirrors in Formulae. class Urls < FormulaCop # These are parts of URLs that look like binaries but actually aren't. - NOT_A_BINARY_URL_PREFIX_WHITELIST = %w[ + NOT_A_BINARY_URL_PREFIX_ALLOWLIST = %w[ https://d...
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/sandbox.rb
@@ -153,7 +153,7 @@ class SandboxProfile (regex #"^/dev/fd/[0-9]+$") (regex #"^/dev/tty[a-z0-9]*$") ) - (deny file-write*) ; deny non-whitelist file write operations + (deny file-write*) ; deny non-allowlist file write operations (allow process-exec (literal ...
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/test/dev-cmd/audit_spec.rb
@@ -234,7 +234,7 @@ class Foo < Formula describe "#audit_deps" do describe "a dependency on a macOS-provided keg-only formula" do - describe "which is whitelisted" do + describe "which is allowlisted" do subject { fa } let(:fa) do @@ -266,7 +266,7 @@ class Foo < Formu...
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/test/rubocops/components_order_spec.rb
@@ -477,6 +477,6 @@ class Foo < Formula RUBY end - include_examples "formulae exist", described_class::COMPONENT_WHITELIST + include_examples "formulae exist", described_class::COMPONENT_ALLOWLIST end end
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/test/rubocops/conflicts_spec.rb
@@ -27,5 +27,5 @@ class FooAT20 < Formula end end - include_examples "formulae exist", described_class::WHITELIST + include_examples "formulae exist", described_class::ALLOWLIST end
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/test/rubocops/keg_only_spec.rb
@@ -46,7 +46,7 @@ class Foo < Formula RUBY end - specify "keg_only_handles_whitelist_correctly" do + specify "keg_only_handles_allowlist_correctly" do expect_no_offenses(<<~RUBY) class Foo < Formula url "https://brew.sh/foo-1.0.tgz"
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/test/rubocops/lines_spec.rb
@@ -865,5 +865,5 @@ class Foo < Formula RUBY end - include_examples "formulae exist", described_class::MAKE_CHECK_WHITELIST + include_examples "formulae exist", described_class::MAKE_CHECK_ALLOWLIST end
true
Other
Homebrew
brew
0041ea21f57c8abf4a543d8645ec25e1704542a6.json
Change occurrences of "whitelist" to "allowlist"
Library/Homebrew/test/rubocops/urls_spec.rb
@@ -239,7 +239,7 @@ class Foo < Formula end end - include_examples "formulae exist", described_class::BINARY_BOOTSTRAP_FORMULA_URLS_WHITELIST + include_examples "formulae exist", described_class::BINARY_BOOTSTRAP_FORMULA_URLS_ALLOWLIST end describe RuboCop::Cop::FormulaAudit::PyPiUrls do
true
Other
Homebrew
brew
9751d3bb8c884f6994739160bfaa40aee831b3e6.json
Fix calls to 'test_ruby' in conditional statements Co-authored-by: Shaun Jackman <sjackman@gmail.com>
Library/Homebrew/utils/ruby.sh
@@ -64,7 +64,7 @@ If there's no Homebrew Portable Ruby available for your processor: IFS=$'\n' # Do word splitting on new lines only for ruby_exec in $(which -a ruby) $(PATH=$HOMEBREW_PATH which -a ruby) do - if [[ $(test_ruby "$ruby_exec") == "true" ]]; then + if test_ruby "$ruby_exe...
false
Other
Homebrew
brew
4f26d85a4611f0f50c96b73162d0d94859e19e7b.json
os/mac/keg_relocate: add missing `libexec` method
Library/Homebrew/keg_relocate.rb
@@ -117,6 +117,10 @@ def lib path/"lib" end + def libexec + path/"libexec" + end + def text_files text_files = [] return text_files unless which("file") && which("xargs")
false
Other
Homebrew
brew
edc6107ccbfa9942de63885b9998de4d60808533.json
rubocop_shared: fix HeredocIndentation rule.
Library/.rubocop_shared.yml
@@ -8,7 +8,7 @@ AllCops: # Use `<<~` for heredocs. Layout/HeredocIndentation: - EnforcedStyle: squiggly + Enabled: true # Not useful in casks and formulae. Metrics/BlockLength:
false
Other
Homebrew
brew
a7b51ebecd35e319a6fe7f8928303dd555449742.json
Cask: use regex in appcast adjusted_version_stanza
Library/Homebrew/cask/audit.rb
@@ -314,7 +314,7 @@ def check_appcast_contains_version "--globoff", "--max-time", "5", appcast_stanza) version_stanza = cask.version.to_s adjusted_version_stanza = if cask.appcast.configuration.blank? - version_stanza.split(",")[0].split("-")[0].split("_")[0] ...
false
Other
Homebrew
brew
1edff7934e378393ff09e0b343161c291c6744dd.json
livecheck: modify regex in tests
Library/Homebrew/test/formula_spec.rb
@@ -668,14 +668,14 @@ livecheck do skip "foo" url "https://brew.sh/test/releases" - regex(/test-(\d+(?:\.\d+)+)\.tbz/) + regex(/test-v?(\d+(?:\.\d+)+)\.t/i) end end expect(f.livecheck.skip?).to be true expect(f.livecheck.skip_msg).to eq("foo") expect(f...
false
Other
Homebrew
brew
8b479ea77be053f3b3d5cf3dafcd15e7dd7d349e.json
manpage: update external commands. - add more detailed manpage section for external commands (more information moved from their READMEs) - add `brew test-bot` to the manpage
Library/Homebrew/commands.rb
@@ -101,7 +101,7 @@ def internal_developer_commands_paths end def official_external_commands_paths - %w[bundle services].map do |cmd| + %w[bundle services test-bot].map do |cmd| tap = Tap.fetch("Homebrew/#{cmd}") tap.install unless tap.installed? external_ruby_v2_cmd_path(cmd)
true
Other
Homebrew
brew
8b479ea77be053f3b3d5cf3dafcd15e7dd7d349e.json
manpage: update external commands. - add more detailed manpage section for external commands (more information moved from their READMEs) - add `brew test-bot` to the manpage
docs/Manpage.md
@@ -1082,23 +1082,52 @@ Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store and Whalebrew. `brew bundle` [`install`]: - Install or upgrade all dependencies in a `Brewfile`. + Install and upgrade (by default) all dependencies from the `Brewfile`. + +You can skip the installation of de...
true
Other
Homebrew
brew
8b479ea77be053f3b3d5cf3dafcd15e7dd7d349e.json
manpage: update external commands. - add more detailed manpage section for external commands (more information moved from their READMEs) - add `brew test-bot` to the manpage
manpages/brew.1
@@ -1388,27 +1388,45 @@ Bundler for non\-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store a . .P \fBbrew bundle\fR [\fBinstall\fR] - Install or upgrade all dependencies in a \fBBrewfile\fR\. + Install and upgrade (by default) all dependencies from the \fBBrewfile\fR\. +. +.P +You can skip the inst...
true
Other
Homebrew
brew
3567892802a19870a1a7ec514c895af3e53de8e2.json
Add notibility checks for casks
Library/Homebrew/cask/audit.rb
@@ -6,6 +6,7 @@ require "digest" require "utils/curl" require "utils/git" +require "utils/notability" module Cask class Audit @@ -14,22 +15,22 @@ class Audit attr_reader :cask, :commit_range, :download - attr_predicate :check_appcast? + attr_predicate :appcast? - def initialize(cask, check_...
true
Other
Homebrew
brew
3567892802a19870a1a7ec514c895af3e53de8e2.json
Add notibility checks for casks
Library/Homebrew/cask/auditor.rb
@@ -8,34 +8,37 @@ class Auditor extend Predicable def self.audit(cask, audit_download: false, audit_appcast: false, - check_token_conflicts: false, quarantine: true, commit_range: nil) + audit_online: false, audit_strict: false, + audit_token_conflicts: ...
true
Other
Homebrew
brew
3567892802a19870a1a7ec514c895af3e53de8e2.json
Add notibility checks for casks
Library/Homebrew/cask/cmd/audit.rb
@@ -1,32 +1,66 @@ # frozen_string_literal: true +require "cli/parser" + module Cask class Cmd class Audit < AbstractCommand - option "--download", :download, false - option "--appcast", :appcast, false - option "--token-conflicts", :token_conflicts, false + ...
true
Other
Homebrew
brew
3567892802a19870a1a7ec514c895af3e53de8e2.json
Add notibility checks for casks
Library/Homebrew/dev-cmd/audit.rb
@@ -3,6 +3,7 @@ require "formula" require "formula_versions" require "utils/curl" +require "utils/notability" require "extend/ENV" require "formula_cellar_checks" require "cmd/search" @@ -510,79 +511,30 @@ def audit_github_repository user, repo = get_repo_data(%r{https?://github\.com/([^/]+)/([^/]+)/?.*}) ...
true
Other
Homebrew
brew
3567892802a19870a1a7ec514c895af3e53de8e2.json
Add notibility checks for casks
Library/Homebrew/test/cask/audit_spec.rb
@@ -39,12 +39,12 @@ def include_msg?(messages, msg) let(:cask) { instance_double(Cask::Cask) } let(:download) { false } - let(:check_token_conflicts) { false } + let(:token_conflicts) { false } let(:fake_system_command) { class_double(SystemCommand) } let(:audit) { - described_class.new(cask, downloa...
true
Other
Homebrew
brew
3567892802a19870a1a7ec514c895af3e53de8e2.json
Add notibility checks for casks
Library/Homebrew/test/cask/cmd/audit_spec.rb
@@ -21,7 +21,13 @@ expect(Cask::CaskLoader).to receive(:load).with(cask_token).and_return(cask) expect(Cask::Auditor).to receive(:audit) - .with(cask, audit_download: false, audit_appcast: false, check_token_conflicts: false, quarantine: true) + .with(cask, audit_download: false, + ...
true
Other
Homebrew
brew
3567892802a19870a1a7ec514c895af3e53de8e2.json
Add notibility checks for casks
Library/Homebrew/utils/notability.rb
@@ -0,0 +1,75 @@ +# frozen_string_literal: true + +require "utils/curl" + +module SharedAudits + module_function + + def github(user, repo) + begin + metadata = GitHub.repository(user, repo) + rescue GitHub::HTTPNotFoundError + return + end + + return if metadata.nil? + + return "GitHub fork ...
true
Other
Homebrew
brew
0b4febceafa02d559add2d955f12ccb465d21a46.json
fix undefined variable interpolation in tcsh
Library/Homebrew/cmd/shellenv.sh
@@ -20,8 +20,8 @@ homebrew-shellenv() { echo "setenv HOMEBREW_CELLAR $HOMEBREW_CELLAR;" echo "setenv HOMEBREW_REPOSITORY $HOMEBREW_REPOSITORY;" echo "setenv PATH $HOMEBREW_PREFIX/bin:$HOMEBREW_PREFIX/sbin:\$PATH;" - echo "setenv MANPATH $HOMEBREW_PREFIX/share/man:\$MANPATH;" - echo "seten...
false
Other
Homebrew
brew
0cced8e7bd2e0b5e52448dc0448a033bb03ec54b.json
audit: Fix Regexp for stripping `.git` from repo URLs - [For a formula named turbogit](https://github.com/Homebrew/homebrew-core/pull/55208), we didn't see any of the notability checks fail CI. - The repo name was getting truncated to `turb`, which didn't exist, so the audit didn't return anything for this check...
Library/Homebrew/dev-cmd/audit.rb
@@ -597,7 +597,7 @@ def get_repo_data(regex) _, user, repo = *regex.match(formula.homepage) unless user return if !user || !repo - repo.gsub!(/.git$/, "") + repo.delete_suffix!(".git") [user, repo] end
false
Other
Homebrew
brew
fd343c0578e4a8f6c7b5d33c3dfce85bf1c0305f.json
cmd/info: fix missing formula reference. Fixes #7639
Library/Homebrew/cmd/info.rb
@@ -105,7 +105,7 @@ def print_info args.named.each_with_index do |f, i| puts unless i.zero? begin - Formulary.factory(f) + formula = Formulary.factory(f) if args.analytics? Utils::Analytics.formula_output(formula) else
false
Other
Homebrew
brew
e10ade758d7937b9f713c7d4f1c7c95d2f2b6721.json
Revert "formulary: install tap if needed."
Library/Homebrew/formulary.rb
@@ -279,8 +279,6 @@ def get_formula(spec, alias_path: nil) end def load_file - tap.install unless tap.installed? - super rescue MethodDeprecatedError => e e.issues_url = tap.issues_url || tap.to_s
true
Other
Homebrew
brew
e10ade758d7937b9f713c7d4f1c7c95d2f2b6721.json
Revert "formulary: install tap if needed."
Library/Homebrew/test/formulary_spec.rb
@@ -227,8 +227,7 @@ class Wrong#{described_class.class_s(formula_name)} < Formula end end - it "raises an error if the Formula is not available after tapping" do - expect_any_instance_of(Tap).to receive(:install) + it "raises an error if the Formula is not available" do expect { ...
true
Other
Homebrew
brew
61b48d8557042519889860a0f57a66fb233e1d23.json
formulary: install tap if needed. This matches what `cask_loader` does and is low risk given we no longer allow tap pinning. Fixes #7626
Library/Homebrew/formulary.rb
@@ -279,6 +279,8 @@ def get_formula(spec, alias_path: nil) end def load_file + tap.install unless tap.installed? + super rescue MethodDeprecatedError => e e.issues_url = tap.issues_url || tap.to_s
true
Other
Homebrew
brew
61b48d8557042519889860a0f57a66fb233e1d23.json
formulary: install tap if needed. This matches what `cask_loader` does and is low risk given we no longer allow tap pinning. Fixes #7626
Library/Homebrew/test/formulary_spec.rb
@@ -227,7 +227,8 @@ class Wrong#{described_class.class_s(formula_name)} < Formula end end - it "raises an error if the Formula is not available" do + it "raises an error if the Formula is not available after tapping" do + expect_any_instance_of(Tap).to receive(:install) expect { ...
true
Other
Homebrew
brew
e6c720c22cd81058a573195d19ded34a2b0ebfb4.json
Update zsh completion
completions/zsh/_brew
@@ -377,17 +377,19 @@ _brew_edit() { '*:: :__brew_formulae_or_ruby_files' } -# brew fetch [--force] [--retry] [-v] [--devel|--HEAD] [--deps] [--build-from-source|--force-bottle] formulae +# brew fetch [--force] [--retry] [-v] [--devel|--HEAD] [--deps] +# [--build-from-source|--build-bottle|--force-bottle] for...
false
Other
Homebrew
brew
575055e36a5ab4c03012c9e105760d1786291c36.json
env_config_spec: remove unneeded BAT_CONFIG tests.
Library/Homebrew/test/env_config_spec.rb
@@ -49,16 +49,6 @@ ENV["HOMEBREW_BAT"] = nil expect(env_config.bat?).to be(false) end - - it "returns value if set" do - ENV["HOMEBREW_BAT_CONFIG_PATH"] = "~/.config/bat/config" - expect(env_config.bat_config_path).to eql("~/.config/bat/config") - end - - it "returns nil if unset" ...
false
Other
Homebrew
brew
8dcb1636ce40425e29c0408a8a366889ef02e8c0.json
utils/ruby.sh: add explanatory comments
Library/Homebrew/utils/ruby.sh
@@ -50,15 +50,15 @@ If there's no Homebrew Portable Ruby available for your processor: then HOMEBREW_RUBY_PATH="/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby" else - IFS=$'\n' + IFS=$'\n' # Do word splitting on new lines only for ruby_exec in $(whi...
false
Other
Homebrew
brew
159a5bb2d6d3a27848d9b7eeb781a222f30e3b0c.json
add compsys cache for brew casks
completions/zsh/_brew_cask
@@ -19,7 +19,13 @@ __brew_cask() { __brew_all_casks() { local -a list local expl - list=( $(brew search --casks) ) + local comp_cachename=brew_casks + + if _cache_invalid $comp_cachename || ! _retrieve_cache $comp_cachename; then + list=( $(brew search --casks) ) + _store_cache $comp_cachename list + f...
false
Other
Homebrew
brew
633501ab089f3c18fea0406f5324a9ebbec55be2.json
audit: remove incorrect TODO. This check can't really be in RuboCop (as it relies on the URL strategy logic).
Library/Homebrew/dev-cmd/audit.rb
@@ -1060,7 +1060,6 @@ def audit_download_strategy url_strategy = DownloadStrategyDetector.detect(url) if using == :git || url_strategy == GitDownloadStrategy - # TODO: check could be in RuboCop problem "Git should specify :revision when a :tag is specified." if specs[:tag] && !specs[:rev...
false
Other
Homebrew
brew
dcc486fa9effd7c8c03d7a8ba940170fd192e8db.json
utils/ruby.sh: find usable Ruby from PATH only
Library/Homebrew/utils/ruby.sh
@@ -13,7 +13,7 @@ setup-ruby-path() { # When bumping check if HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH (in brew.sh) # also needs to be changed. local required_ruby_version="2.6" - local old_ruby_path ruby_clean_path ruby_user_path + local ruby_exec local advice=" If there's no Homebrew Portable Ruby availab...
false
Other
Homebrew
brew
fbabeb446839ea1bd327d39612486293647af85b.json
add a comment
.github/workflows/tests.yml
@@ -71,6 +71,8 @@ jobs: # Link old gettext (otherwise `brew doctor` is sad) brew link gettext + + # remove deleted formula brew uninstall --force python@2 fi brew doctor
false
Other
Homebrew
brew
667d87ce67ceae9fffd03316e62523c6647c7121.json
workflows/tests: set global environment. We never want to auto-update and we want to globally set that we're in GitHub Actions.
.github/workflows/tests.yml
@@ -6,6 +6,9 @@ on: release: types: - published +env: + HOMEBREW_GITHUB_ACTIONS: 1 + HOMEBREW_NO_AUTO_UPDATE: 1 jobs: tests: if: github.repository == 'Homebrew/brew' @@ -66,9 +69,6 @@ jobs: # Cleanup some Linux `brew doctor` failures sudo rm -rf /usr/local/include/node/ ...
false
Other
Homebrew
brew
957f318f2cfb9e83f440572b12fd8b45a39e0776.json
Specify the stance on mocks in test blocks
docs/Formula-Cookbook.md
@@ -277,7 +277,7 @@ Some advice for specific cases: * If the formula is a library, compile and run some simple code that links against it. It could be taken from upstream's documentation / source examples. A good example is [`tinyxml2`](https://github.com/Homebrew/homebrew-core/blob/master/Formula/tinyxml2.rb), which...
false
Other
Homebrew
brew
7ac337181a3abbecc99c36d3702e7a0662117584.json
use helper methods
Library/Homebrew/diagnostic.rb
@@ -833,20 +833,19 @@ def check_homebrew_prefix end def check_deleted_formula - formulae = Dir.children(HOMEBREW_CELLAR) - formulae.delete(".keepme") + kegs = Keg.all deleted_formulae = [] - formulae.each do |f| - Formula[f] + kegs.each do |keg| + ...
false
Other
Homebrew
brew
c70bb474e3d8ae447042e2d24ed1d67e6071dc48.json
os/mac: move legacy functions to compat
Library/Homebrew/compat.rb
@@ -4,3 +4,4 @@ require "compat/language/python" require "compat/requirements/macos_requirement" require "compat/formula" +require "compat/os/mac" if OS.mac?
true
Other
Homebrew
brew
c70bb474e3d8ae447042e2d24ed1d67e6071dc48.json
os/mac: move legacy functions to compat
Library/Homebrew/compat/os/mac.rb
@@ -0,0 +1,30 @@ +# frozen_string_literal: true + +module OS + module Mac + class << self + module Compat + def preferred_arch + # odeprecated "MacOS.preferred_arch", "Hardware::CPU.arch (or ideally let the compiler handle it)" + if Hardware::CPU.is_64_bit? + Hardware::CPU.a...
true
Other
Homebrew
brew
c70bb474e3d8ae447042e2d24ed1d67e6071dc48.json
os/mac: move legacy functions to compat
Library/Homebrew/os/mac.rb
@@ -166,14 +166,6 @@ def macports_or_fink paths.uniq end - def preferred_arch - if Hardware::CPU.is_64_bit? - Hardware::CPU.arch_64_bit - else - Hardware::CPU.arch_32_bit - end - end - def app_with_bundle_id(*ids) path = mdfind(*ids) .reject { |...
true
Other
Homebrew
brew
44ef1abd1f9b02453ba802b8b0f286e48c981838.json
utils/ruby.sh: suppress standard error in test-ruby
Library/Homebrew/utils/ruby.sh
@@ -1,7 +1,7 @@ test-ruby () { "$1" --enable-frozen-string-literal --disable=gems,did_you_mean,rubyopt -rrubygems -e \ "puts Gem::Version.new(RUBY_VERSION.to_s.dup).to_s.split('.').first(2) == \ - Gem::Version.new('$required_ruby_version').to_s.split('.').first(2)" + Gem::Version.new('$requir...
false
Other
Homebrew
brew
2ffb87cb0312c28db8c04afa89736b1fed6a805c.json
resource: fix patching when patch already fetched This inappropriately modified the shared `patches` variable, meaning an already fetched patch would be removed and therefore not be applied when the resource was staged.
Library/Homebrew/resource.rb
@@ -86,9 +86,12 @@ def prepare_patches end def fetch_patches(skip_downloaded: false) - patches.select!(&:external?) - patches.reject!(&:downloaded?) if skip_downloaded - patches.each(&:fetch) + patches.each do |p| + next unless p.external? + next if p.downloaded? && skip_downloaded + + ...
false
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
Library/Homebrew/cmd/shellenv.sh
@@ -3,7 +3,7 @@ #: Print export statements. When run in a shell, this installation of Homebrew will be added to your `PATH`, `MANPATH`, and `INFOPATH`. #: #: The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multiple times. -#: Consider adding ev...
true
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
Library/Homebrew/manpages/brew-cask.1.md
@@ -243,7 +243,8 @@ Environment variables specific to Homebrew Cask: * `HOMEBREW_CASK_OPTS`: This variable may contain any arguments normally used as options on the command-line. This is particularly useful to make options persistent. - For example, you might add to your .bash_profile or .zshenv somethi...
true
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
Library/Homebrew/test/utils/shell_spec.rb
@@ -4,19 +4,19 @@ describe Utils::Shell do describe "::profile" do - it "returns ~/.bash_profile by default" do + it "returns ~/.profile by default" do ENV["SHELL"] = "/bin/another_shell" - expect(subject.profile).to eq("~/.bash_profile") + expect(subject.profile).to eq("~/.profile") e...
true
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
Library/Homebrew/utils/shell.rb
@@ -39,9 +39,15 @@ def export_value(key, value, shell = preferred) # return the shell profile file based on user's preferred shell def profile - return "#{ENV["ZDOTDIR"]}/.zshrc" if preferred == :zsh && ENV["ZDOTDIR"].present? + case preferred + when :bash + bash_profile = "#{ENV["HOME...
true
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
docs/Gems,-Eggs-and-Perl-Modules.md
@@ -114,7 +114,7 @@ sudo cpan local::lib Note that this will install some other dependencies like `Module::Install`. Then put the appropriate incantation in your shell’s startup, e.g. for -`.bash_profile` you insert the below, for others see the +`.profile` you insert the below, for others see the [`local::lib`](h...
true
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
docs/Manpage.md
@@ -435,7 +435,7 @@ ones). No online search is performed. Print export statements. When run in a shell, this installation of Homebrew will be added to your `PATH`, `MANPATH`, and `INFOPATH`. The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multipl...
true
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
docs/Shell-Completion.md
@@ -8,7 +8,7 @@ You must configure your shell to enable its completion support. This is because ## Configuring Completions in `bash` -To make Homebrew's completions available in `bash`, you must source the definitions as part of your shell's startup. Add the following to your `~/.bash_profile` file: +To make Homeb...
true
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
manpages/brew-cask.1
@@ -274,7 +274,7 @@ Environment variables specific to Homebrew Cask: . .TP \fBHOMEBREW_CASK_OPTS\fR -This variable may contain any arguments normally used as options on the command\-line\. This is particularly useful to make options persistent\. For example, you might add to your \.bash_profile or \.zshenv something...
true
Other
Homebrew
brew
133ee7966dbebd965f8d306bdaa78706399e67f3.json
shell: Use .profile unless .bash_profile exists
manpages/brew.1
@@ -576,7 +576,7 @@ Search for \fItext\fR in the given package manager\'s list\. Print export statements\. When run in a shell, this installation of Homebrew will be added to your \fBPATH\fR, \fBMANPATH\fR, and \fBINFOPATH\fR\. . .P -The variables \fBHOMEBREW_PREFIX\fR, \fBHOMEBREW_CELLAR\fR and \fBHOMEBREW_REPOSITO...
true
Other
Homebrew
brew
1cba5821fd8d26c1e9ba55e368644c529838c404.json
cmd/update.sh: define conditions for unsetting HOMEBREW_RUBY_PATH
Library/Homebrew/cmd/update.sh
@@ -599,6 +599,13 @@ EOS -d "$HOMEBREW_LIBRARY/LinkedKegs" || (-n "$HOMEBREW_DEVELOPER" && -z "$HOMEBREW_UPDATE_PREINSTALL") ]] then + if [[ -n $HOMEBREW_FORCE_VENDOR_RUBY && + -x $HOMEBREW_LIBRARY/Homebrew/vendor/portable-ruby/current/bin/ruby ]] + then + export HOMEBREW_RUBY_P...
false
Other
Homebrew
brew
a333014c55c1edc2555cd2dfbd8dc07463cc9b76.json
formula_installer: ignore dependencies when fetching. Whenever you are fetching a dependency you only care about fetching that specific dependency and not all the dependencies of that dependency. Unlike installing, dependencies can be fetched in any order and have no "chains" between them.
Library/Homebrew/formula_installer.rb
@@ -572,6 +572,10 @@ def fetch_dependency(dep) fi.verbose = verbose? fi.quiet = quiet? fi.debug = debug? + # When fetching we don't need to recurse the dependency tree as it's already + # been done for us in `compute_dependencies` and there's no r...
false
Other
Homebrew
brew
58cecf38cf66117dddb09af0020d3426f1e90da2.json
resource: restore fetch in stage Fixes #7546.
Library/Homebrew/formula.rb
@@ -1160,7 +1160,6 @@ def patch # @private def brew @prefix_returns_versioned_prefix = true - active_spec.fetch stage do |staging| staging.retain! if Homebrew.args.keep_tmp? prepare_patches
true
Other
Homebrew
brew
58cecf38cf66117dddb09af0020d3426f1e90da2.json
resource: restore fetch in stage Fixes #7546.
Library/Homebrew/resource.rb
@@ -70,6 +70,7 @@ def clear_cache def stage(target = nil, &block) raise ArgumentError, "target directory or block is required" unless target || block + fetch prepare_patches unpack(target, &block)
true
Other
Homebrew
brew
5be4682ecb4a476f69329c66af92a655338e7e28.json
brew.sh: add an empty line for code readability Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/brew.sh
@@ -116,6 +116,7 @@ then else HOMEBREW_GIT="git" fi + if [[ -n "$HOMEBREW_MACOS" ]] then HOMEBREW_PROCESSOR="$(uname -p)"
false
Other
Homebrew
brew
6ff307c45620003f2a1eece707787d9bddc12527.json
brew.sh: remove unnecessary empty line Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/brew.sh
@@ -116,8 +116,6 @@ then else HOMEBREW_GIT="git" fi - - if [[ -n "$HOMEBREW_MACOS" ]] then HOMEBREW_PROCESSOR="$(uname -p)"
false
Other
Homebrew
brew
08a9f0e1c093a8de3acb31c5bc12664cfeecd102.json
Use FormulaInstaller#fetch before #prelude.
Library/Homebrew/cask/installer.rb
@@ -368,8 +368,8 @@ def cask_and_formula_dependencies fi.installed_on_request = false fi.show_header = true fi.verbose = verbose? - fi.prelude fi.fetch + fi.prelude fi.install fi.finish end
true
Other
Homebrew
brew
08a9f0e1c093a8de3acb31c5bc12664cfeecd102.json
Use FormulaInstaller#fetch before #prelude.
Library/Homebrew/cmd/install.rb
@@ -325,8 +325,8 @@ def install_formula(f) fi.build_bottle = args.build_bottle? fi.interactive = args.interactive? fi.git = args.git? - fi.prelude fi.fetch + fi.prelude fi.install fi.finish rescue FormulaInstallationAlreadyAttemptedError
true
Other
Homebrew
brew
08a9f0e1c093a8de3acb31c5bc12664cfeecd102.json
Use FormulaInstaller#fetch before #prelude.
Library/Homebrew/cmd/upgrade.rb
@@ -183,7 +183,6 @@ def upgrade_formula(f) fi.installed_as_dependency = tab.installed_as_dependency fi.installed_on_request ||= tab.installed_on_request end - fi.prelude upgrade_version = if f.optlinked? "#{Keg.new(f.opt_prefix).version} -> #{f.pkg_version}" @@ -193,6 +192,7 @@ def ...
true
Other
Homebrew
brew
08a9f0e1c093a8de3acb31c5bc12664cfeecd102.json
Use FormulaInstaller#fetch before #prelude.
Library/Homebrew/reinstall.rb
@@ -35,8 +35,8 @@ def reinstall_formula(f, build_from_source: false) fi.installed_as_dependency = tab.installed_as_dependency fi.installed_on_request = tab.installed_on_request end - fi.prelude fi.fetch + fi.prelude oh1 "Reinstalling #{Formatter.identifier(f.full_name)} #{options...
true
Other
Homebrew
brew
08a9f0e1c093a8de3acb31c5bc12664cfeecd102.json
Use FormulaInstaller#fetch before #prelude.
Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb
@@ -176,8 +176,8 @@ def install_test_formula(name, content = nil, build_bottle: false) setup_test_formula(name, content) fi = FormulaInstaller.new(Formula[name]) fi.build_bottle = build_bottle - fi.prelude fi.fetch + fi.prelude fi.install fi.finish end
true
Other
Homebrew
brew
48918bb5e33440d97c7ce12186b97fb0026e4bbf.json
formula_installer: add fetch_dependency method. This uses `FormulaInstaller#fetch` to recursively fetch dependencies through the dependency tree and allows `install_dependency` to not do any fetching.
Library/Homebrew/formula_installer.rb
@@ -561,6 +561,18 @@ def install_dependencies(deps) @show_header = true unless deps.empty? end + def fetch_dependency(dep) + df = dep.to_formula + fi = FormulaInstaller.new(df) + + fi.build_from_source = Homebrew.args.build_formula_from_source?(df) + fi.force_bottle = false + ...
false
Other
Homebrew
brew
9ecc04fbe4c65806ef704309e48563a951226755.json
workflows: fix docker tag
.github/workflows/tests.yml
@@ -196,5 +196,5 @@ jobs: docker tag brew "docker.pkg.github.com/homebrew/brew/brew:$v" docker push "docker.pkg.github.com/homebrew/brew/brew:$v" docker login docker.com -u brewtestbot -p ${{secrets.DOCKER_TOKEN}} - docker tag "brew homebrew/brew:$v" + docker tag brew "homebrew/...
false
Other
Homebrew
brew
e4823ea6fe4fa7a89c2dd6da59e091e29ba5a6f0.json
cmd/uninstall: fix Array comparison In #7526 a comparison for `paths` was introduced, but if `paths` is ever `nil`, this triggers an error. Coercing the variable to an Array should alleviate this problem, as `nil.to_a` produces an empty and comparable Array. Fixes #7540 Signed-off-by: Mike Fiedler <miketheman@gmail...
Library/Homebrew/cmd/uninstall.rb
@@ -92,7 +92,7 @@ def uninstall end unversioned_name = f.name.gsub(/@.+$/, "") - maybe_paths = Dir.glob("#{f.etc}/*#{unversioned_name}*") - paths + maybe_paths = Dir.glob("#{f.etc}/*#{unversioned_name}*") - paths.to_a if maybe_paths.present? ...
false
Other
Homebrew
brew
af278b15de03ea410b5d057518747446bbf8b8c4.json
cli/parser: add formulae method. This removes the coupling on args.formulae before it has been parsed.
Library/Homebrew/cli/parser.rb
@@ -3,6 +3,7 @@ require "cli/args" require "optparse" require "set" +require "formula" COMMAND_DESC_WIDTH = 80 OPTION_DESC_WIDTH = 43 @@ -188,7 +189,7 @@ def generate_help_text end def formula_options - @args.formulae.each do |f| + formulae.each do |f| next if f.options.e...
false
Other
Homebrew
brew
4b68c7a08c56f819b11d308878e437a9aaba3194.json
tests.yml: Deploy the Docker image to Docker Hub
.github/workflows/tests.yml
@@ -174,30 +174,27 @@ jobs: - name: Build Docker image if: matrix.os == 'ubuntu-latest' - run: | - docker pull homebrew/brew - docker-compose -f Dockerfile.yml build sut + run: docker build -t brew . - name: Run brew test-bot run: | if [ "$RUNNER_OS" = "Linux...
true
Other
Homebrew
brew
4b68c7a08c56f819b11d308878e437a9aaba3194.json
tests.yml: Deploy the Docker image to Docker Hub
Dockerfile.yml
@@ -1,17 +0,0 @@ -version: '3.7' - -services: - sut: - build: - context: . - cache_from: - - homebrew/brew - args: - - FORCE_REBUILD=1 - command: - - sh - - -xc - - | - /home/linuxbrew/.linuxbrew/bin/brew test-bot - status=$$? - exit $$status
true
Other
Homebrew
brew
8e318d81bcbf88d1829cdfba8c390f553c8787a1.json
formula: add pkgetc method. This should provide a more "type-safe" way of referring to the `etc` directories of other formulae e.g. https://github.com/Homebrew/homebrew-core/pull/54257 so that the output will change if the formula name changes.
Library/Homebrew/formula.rb
@@ -790,6 +790,14 @@ def etc (HOMEBREW_PREFIX/"etc").extend(InstallRenamed) end + # A subdirectory of `etc` with the formula name suffixed. + # e.g. `$HOMEBREW_PREFIX/etc/openssl@1.1` + # Anything using `pkgetc.install` will not overwrite other files on + # e.g. upgrades but will write a new file named `*...
false
Other
Homebrew
brew
3a9e12efac47882309de4698c58a57e630d84cb0.json
docker.yml: Fix a typo
.github/workflows/docker.yml
@@ -30,7 +30,6 @@ jobs: if: startsWith(github.ref, 'refs/tags/') run: | brew_version=${GITHUB_REF:10} - echo "::set-env brew_version=$brew_version" echo "::set-env name=brew_version::$brew_version" docker login docker.pkg.github.com -u BrewTestBot -p ${{secret...
false
Other
Homebrew
brew
305ecfd66e850297026e58f1e09eb93ba0b759b5.json
docker.yml: Deploy tagged image to Docker Hub
.github/workflows/docker.yml
@@ -18,14 +18,26 @@ jobs: uses: actions/checkout@master with: fetch-depth: 0 + - name: Configure Git + run: | + git config --unset "http.https://github.com/.extraheader" + git fetch origin master - name: Build Docker image run: docker build -t b...
false
Other
Homebrew
brew
16141e7effe453cfe94ae274dadaf4b3ecf6767a.json
os/mac/software_spec: fix argument error in valid use case
Library/Homebrew/extend/os/mac/software_spec.rb
@@ -11,7 +11,7 @@ def uses_from_macos(deps, bounds = {}) deps = Hash[*bounds.shift] end - bounds.transform_values! { |v| MacOS::Version.from_symbol(v) } + bounds = bounds.transform_values { |v| MacOS::Version.from_symbol(v) } if MacOS.version >= bounds[:since] @uses_from_macos_elements <...
true
Other
Homebrew
brew
16141e7effe453cfe94ae274dadaf4b3ecf6767a.json
os/mac/software_spec: fix argument error in valid use case
Library/Homebrew/test/os/mac/formula_spec.rb
@@ -3,6 +3,43 @@ require "formula" describe Formula do + describe "#uses_from_macos" do + before do + allow(OS).to receive(:mac?).and_return(true) + allow(OS::Mac).to receive(:version).and_return(OS::Mac::Version.from_symbol(:sierra)) + end + + it "adds a macOS dependency to all specs if the OS ...
true
Other
Homebrew
brew
fe45f680008e6f8c43c3193cd6f9b9defd45be7c.json
brew.sh: check versions of proper cURL and Git User may specify which cURL and Git to use via HOMEBREW_CURL_PATH and HOMEBREW_GIT_PATH. So, let's use these to determine whether we need to use their vendored alternatives.
Library/Homebrew/brew.sh
@@ -93,6 +93,31 @@ case "$HOMEBREW_SYSTEM" in Linux) HOMEBREW_LINUX="1" ;; esac +if [[ -n "$HOMEBREW_FORCE_BREWED_CURL" && + -x "$HOMEBREW_PREFIX/opt/curl/bin/curl" ]] && + "$HOMEBREW_PREFIX/opt/curl/bin/curl" --version >/dev/null +then + HOMEBREW_CURL="$HOMEBREW_PREFIX/opt/curl/bin/curl" +elif [[ ...
false
Other
Homebrew
brew
5052f49f40bf6235fe458a21cf50ded08aca3958.json
Build Docker images for Ubuntu 18.04 and 20.04
.dockerignore
@@ -0,0 +1,2 @@ +Library/Homebrew/vendor/portable-ruby +Library/Taps
true
Other
Homebrew
brew
5052f49f40bf6235fe458a21cf50ded08aca3958.json
Build Docker images for Ubuntu 18.04 and 20.04
.github/workflows/docker.yml
@@ -0,0 +1,31 @@ +name: Docker +on: + pull_request: + paths: + - .github/workflows/docker.yml + - Dockerfile + release: + types: + - published +jobs: + ubuntu: + runs-on: ubuntu-latest + strategy: + matrix: + version: ["18.04", "20.04"] + steps: + - name: Checkout + ...
true
Other
Homebrew
brew
5052f49f40bf6235fe458a21cf50ded08aca3958.json
Build Docker images for Ubuntu 18.04 and 20.04
.github/workflows/tests.yml
@@ -187,14 +187,14 @@ jobs: brew test-bot fi - - name: Deploy the latest Docker image + - name: Deploy the latest Docker image to GitHub if: matrix.os == 'ubuntu-latest' && github.ref == 'refs/heads/master' run: | docker login docker.pkg.github.com -u BrewTestBot -p ${...
true
Other
Homebrew
brew
5052f49f40bf6235fe458a21cf50ded08aca3958.json
Build Docker images for Ubuntu 18.04 and 20.04
.gitignore
@@ -151,6 +151,7 @@ /docs/vendor # Unignore our root-level metadata files. +!/.dockerignore !/.editorconfig !/.gitignore !/.yardopts
true
Other
Homebrew
brew
5052f49f40bf6235fe458a21cf50ded08aca3958.json
Build Docker images for Ubuntu 18.04 and 20.04
Dockerfile
@@ -1,11 +1,9 @@ -FROM ubuntu:xenial -LABEL maintainer="Shaun Jackman <sjackman@gmail.com>" +ARG version=16.04 +FROM ubuntu:$version +ARG DEBIAN_FRONTEND=noninteractive # hadolint ignore=DL3008 RUN apt-get update \ - && apt-get install -y --no-install-recommends software-properties-common \ - && add-apt-repositor...
true
Other
Homebrew
brew
3717815adec94d952115cb8461c544170458fec0.json
ENV/std: fix error when using older/no clang Fixes #7482.
Library/Homebrew/extend/ENV/std.rb
@@ -112,7 +112,7 @@ def determine_cxx def clang super replace_in_cflags(/-Xarch_#{Hardware::CPU.arch_32_bit} (-march=\S*)/, '\1') - map = Hardware::CPU.optimization_flags + map = Hardware::CPU.optimization_flags.dup if DevelopmentTools.clang_build_version < 700 # Clang mistakenly enables ...
false
Other
Homebrew
brew
3de9fc91a7995e372e275f32a19ee3b30b1fb565.json
update dynamic linkers
Library/Homebrew/extend/os/linux/install.rb
@@ -6,6 +6,7 @@ module Install DYNAMIC_LINKERS = [ "/lib64/ld-linux-x86-64.so.2", + "/lib64/ld64.so.2", "/lib/ld-linux.so.3", "/lib/ld-linux.so.2", "/lib/ld-linux-aarch64.so.1",
false
Other
Homebrew
brew
51d8ce8e8f92665029d23597a88cdc7d3cfedc31.json
workflows/tests: simplify PATH setup. Doesn't need to be a separate step.
.github/workflows/tests.yml
@@ -14,14 +14,6 @@ jobs: matrix: os: [ubuntu-latest, macOS-latest] steps: - - name: Set up Homebrew PATH - run: | - if [ "$RUNNER_OS" = "Linux" ]; then - echo "::add-path::/home/linuxbrew/.linuxbrew/bin" - else - echo "::add-path::/usr/local/bin" - fi ...
false
Other
Homebrew
brew
3df97b20d52ef76043fcc33cd5040886dc6da2b3.json
Add PowerPC64 CPU Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/extend/os/linux/hardware/cpu.rb
@@ -3,17 +3,12 @@ module Hardware class CPU class << self - OPTIMIZATION_FLAGS_LINUX = { - native: "-march=#{Homebrew::EnvConfig.arch}", - nehalem: "-march=nehalem", - core2: "-march=core2", - core: "-march=prescott", - armv6: "-march=armv6", - armv8: "-...
true
Other
Homebrew
brew
3df97b20d52ef76043fcc33cd5040886dc6da2b3.json
Add PowerPC64 CPU Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/extend/os/linux/install.rb
@@ -14,6 +14,19 @@ module Install "/system/bin/linker", ].freeze + def check_cpu + return if (Hardware::CPU.intel? && Hardware::CPU.is_64_bit?) || Hardware::CPU.arm? + + message = "Sorry, Homebrew does not support your computer's CPU architecture!" + if Hardware::CPU.ppc64le? + me...
true
Other
Homebrew
brew
3df97b20d52ef76043fcc33cd5040886dc6da2b3.json
Add PowerPC64 CPU Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/hardware.rb
@@ -7,28 +7,29 @@ class CPU INTEL_32BIT_ARCHS = [:i386].freeze INTEL_64BIT_ARCHS = [:x86_64].freeze PPC_32BIT_ARCHS = [:ppc, :ppc32, :ppc7400, :ppc7450, :ppc970].freeze - PPC_64BIT_ARCHS = [:ppc64].freeze + PPC_64BIT_ARCHS = [:ppc64, :ppc64le, :ppc970].freeze class << self - OPTIM...
true
Other
Homebrew
brew
3df97b20d52ef76043fcc33cd5040886dc6da2b3.json
Add PowerPC64 CPU Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/install.rb
@@ -10,14 +10,16 @@ module Install module_function def check_cpu - case Hardware::CPU.type - when :ppc - abort <<~EOS - Sorry, Homebrew does not support your computer's CPU architecture. - For PPC support, see: + return if Hardware::CPU.intel? && Hardware::CPU.is_64_b...
true
Other
Homebrew
brew
682914bf40733303105680b165c8a324b1ba90bd.json
Improve readability of guard clause Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
Library/Homebrew/cask/cask.rb
@@ -123,7 +123,7 @@ def outdated_versions(greedy = false) end def outdated_info(greedy, verbose, json) - return token unless verbose || json + return token if !verbose && !json installed_versions = outdated_versions(greedy).join(", ")
false
Other
Homebrew
brew
eb303dd65438417c20c860bf1c5246d0535dc9bf.json
software_spec: add uses_from_macos since bound
Library/Homebrew/extend/os/mac/software_spec.rb
@@ -3,8 +3,19 @@ class SoftwareSpec undef uses_from_macos - def uses_from_macos(deps) + def uses_from_macos(deps, bounds = {}) @uses_from_macos_elements ||= [] - @uses_from_macos_elements << deps + + if deps.is_a?(Hash) + bounds = deps.dup + deps = Hash[*bounds.shift] + end + + bounds...
true
Other
Homebrew
brew
eb303dd65438417c20c860bf1c5246d0535dc9bf.json
software_spec: add uses_from_macos since bound
Library/Homebrew/formula.rb
@@ -2431,8 +2431,8 @@ def depends_on(dep) # Indicates use of dependencies provided by macOS. # On macOS this is a no-op (as we use the system libraries there). # On Linux this will act as `depends_on`. - def uses_from_macos(dep) - specs.each { |spec| spec.uses_from_macos(dep) } + def uses_from...
true
Other
Homebrew
brew
eb303dd65438417c20c860bf1c5246d0535dc9bf.json
software_spec: add uses_from_macos since bound
Library/Homebrew/rubocops/dependency_order.rb
@@ -126,7 +126,7 @@ def verify_order_in_source(ordered) # Node pattern method to extract `name` in `depends_on :name` or `uses_from_macos :name` def_node_search :dependency_name_node, <<~EOS - {(send nil? {:depends_on :uses_from_macos} {(hash (pair $_ _)) $({str sym} _) $(const nil? _)}) + ...
true
Other
Homebrew
brew
eb303dd65438417c20c860bf1c5246d0535dc9bf.json
software_spec: add uses_from_macos since bound
Library/Homebrew/software_spec.rb
@@ -171,7 +171,8 @@ def depends_on(spec) add_dep_option(dep) if dep end - def uses_from_macos(spec) + def uses_from_macos(spec, _bounds = {}) + spec = Hash[*spec.first] if spec.is_a?(Hash) depends_on(spec) end
true
Other
Homebrew
brew
eb303dd65438417c20c860bf1c5246d0535dc9bf.json
software_spec: add uses_from_macos since bound
Library/Homebrew/test/os/linux/formula_spec.rb
@@ -19,6 +19,18 @@ expect(f.class.devel.deps.first.name).to eq("foo") expect(f.class.head.deps.first.name).to eq("foo") end + + it "ignores OS version specifications" do + f = formula "foo" do + url "foo-1.0" + + uses_from_macos "foo", since: :mojave + end + + expect(f...
true