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 | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | Library/Homebrew/cmd/upgrade.rb | @@ -23,6 +23,9 @@ def upgrade_args
installed with, plus any appended brew formula options. If <cask> or <formula> are specified,
upgrade only the given <cask> or <formula> kegs (unless they are pinned; see `pin`, `unpin`).
+ Unless `HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK` is set, `brew upgrad... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -301,7 +301,7 @@ def formulae_need_bottles?(tap, original_commit, user, repo, pr, args:)
def changed_formulae(tap, original_commit)
if Homebrew::EnvConfig.disable_load_formula?
- opoo "Can't check if updated bottles are necessary as formula loading is disabled!"
+ opoo "Can't check if updated bot... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | Library/Homebrew/download_strategy.rb | @@ -520,7 +520,7 @@ def _fetch(url:, resolved_url:, timeout:)
if Homebrew::EnvConfig.no_insecure_redirect? &&
url.start_with?("https://") && !resolved_url.start_with?("https://")
- $stderr.puts "HTTPS to HTTP redirect detected & HOMEBREW_NO_INSECURE_REDIRECT is set."
+ $stderr.puts "HTTPS to HT... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | Library/Homebrew/env_config.rb | @@ -26,7 +26,9 @@ module EnvConfig
"`http://localhost:8080/example.com/foo.tar.gz`.",
},
HOMEBREW_AUTO_UPDATE_SECS: {
- description: "Automatically check for updates once per this seconds interval.",
+ description: "Run `brew update` once every `HOMEBREW_A... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | Library/Homebrew/formula_installer.rb | @@ -1302,7 +1302,8 @@ def forbidden_license_check
next unless SPDX.licenses_forbid_installation? dep_f.license, forbidden_licenses
raise CannotInstallFormulaError, <<~EOS
- The installation of #{formula.name} has a dependency on #{dep.name} where all its licenses are forbidden:
+ The insta... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | Library/Homebrew/install.rb | @@ -125,7 +125,10 @@ def install_formula?(
# dependencies. Therefore before performing other checks we need to be
# sure --force flag is passed.
if f.outdated?
- return true unless Homebrew::EnvConfig.no_install_upgrade?
+ unless Homebrew::EnvConfig.no_install_upgrade?
+ ... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | Library/Homebrew/manpages/brew.1.md.erb | @@ -57,6 +57,8 @@ For the full command list, see the [COMMANDS](#commands) section.
With `--verbose` or `--debug`, many commands print extra debugging information.
Note that these options should only appear after a command.
+Some command behaviour can be customised with environment variables; see the [ENVIRONMENT](... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | Library/Homebrew/upgrade.rb | @@ -318,6 +318,7 @@ def check_installed_dependents(
# Assess the dependents tree again now we've upgraded.
oh1 "Checking for dependents of upgraded formulae..." unless dry_run
+
broken_dependents = check_broken_dependents(installed_formulae)
if broken_dependents.blank?
if dry_run
... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | docs/Manpage.md | @@ -41,6 +41,8 @@ For the full command list, see the [COMMANDS](#commands) section.
With `--verbose` or `--debug`, many commands print extra debugging information.
Note that these options should only appear after a command.
+Some command behaviour can be customised with environment variables; see the [ENVIRONMENT](... | true |
Other | Homebrew | brew | 11c5f8f05ad01439aefcbf518816f6833a1a043d.json | Improve discovery of some environment variables
There's a few bits of functionality that Homebrew has changed over the
years, makes sense as a sensible default but some people find really
annoying:
- automatically running `brew update`
- automatically running `brew cleanup`
- automatically upgrading outdated dependen... | manpages/brew.1 | @@ -61,6 +61,9 @@ For the full command list, see the \fICOMMANDS\fR section\.
.P
With \fB\-\-verbose\fR or \fB\-\-debug\fR, many commands print extra debugging information\. Note that these options should only appear after a command\.
.
+.P
+Some command behaviour can be customised with environment variables; see th... | true |
Other | Homebrew | brew | 7ab42264885f122f408181494401a4877bfd79dc.json | Update RBI files for bootsnap. | Library/Homebrew/sorbet/rbi/gems/bootsnap@1.9.3.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `bootsnap` gem.
# Please instead update this file by running `bin/tapioca gem bootsnap`.
-# typed: true
-
module Bootsnap
extend ::Bootsnap
@@ -62,7 +62,7 @@ class Bootsnap::LoadPathCache::Cach... | false |
Other | Homebrew | brew | 62a63063bb4cc191acd268ac96fec6b96e9d3888.json | Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Signed-off-by: XuehaiPan <XuehaiPan@pku.edu.cn> | Library/Homebrew/cmd/update-report.rb | @@ -40,14 +40,14 @@ def update_report_args
end
def update_report
- return update_report_impl if $stdout.tty?
+ return output_update_report if $stdout.tty?
redirect_stdout($stderr) do
- return update_report_impl
+ output_update_report
end
end
- def update_report_impl
+ def outp... | true |
Other | Homebrew | brew | 62a63063bb4cc191acd268ac96fec6b96e9d3888.json | Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Signed-off-by: XuehaiPan <XuehaiPan@pku.edu.cn> | Library/Homebrew/style.rb | @@ -277,13 +277,11 @@ def shell_scripts
end
def shellcheck
- # Always use the latest brewed shellcheck
ensure_formula_installed!("shellcheck", latest: true,
reason: "shell style checks").opt_bin/"shellcheck"
end
def shfmt
- # Always... | true |
Other | Homebrew | brew | 62a63063bb4cc191acd268ac96fec6b96e9d3888.json | Apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Signed-off-by: XuehaiPan <XuehaiPan@pku.edu.cn> | Library/Homebrew/utils.rb | @@ -438,7 +438,7 @@ def redirect_stdout(file)
# Ensure the given formula is installed
# This is useful for installing a utility formula (e.g. `shellcheck` for `brew style`)
- def ensure_formula_installed!(formula_or_name, latest: false, reason: "",
+ def ensure_formula_installed!(formula_or_name, reason: "", ... | true |
Other | Homebrew | brew | 9ef52080e37091467b477e3eb79dc9c9fb495591.json | utils: extract common word "for" in `reason` | Library/Homebrew/dev-cmd/bottle.rb | @@ -260,7 +260,7 @@ def setup_tar_and_args!(args)
return default_tar_args
end
- ensure_formula_installed!(gnu_tar, reason: "for bottling")
+ ensure_formula_installed!(gnu_tar, reason: "bottling")
["#{gnu_tar.opt_bin}/gtar", gnutar_args].freeze
end | true |
Other | Homebrew | brew | 9ef52080e37091467b477e3eb79dc9c9fb495591.json | utils: extract common word "for" in `reason` | Library/Homebrew/dev-cmd/bump.rb | @@ -59,7 +59,7 @@ def bump
unless Utils::Curl.curl_supports_tls13?
begin
unless Pathname.new(ENV["HOMEBREW_BREWED_CURL_PATH"]).exist?
- ensure_formula_installed!("curl", reason: "for Repology queries")
+ ensure_formula_installed!("curl", reason: "Repology queries")
end
... | true |
Other | Homebrew | brew | 9ef52080e37091467b477e3eb79dc9c9fb495591.json | utils: extract common word "for" in `reason` | Library/Homebrew/dev-cmd/cat.rb | @@ -34,7 +34,7 @@ def cat
ENV["BAT_CONFIG_PATH"] = Homebrew::EnvConfig.bat_config_path
ensure_formula_installed!(
"bat",
- reason: "for displaying <formula>/<cask> source",
+ reason: "displaying <formula>/<cask> source",
# The user might want to capture ... | true |
Other | Homebrew | brew | 9ef52080e37091467b477e3eb79dc9c9fb495591.json | utils: extract common word "for" in `reason` | Library/Homebrew/dev-cmd/tests.rb | @@ -50,7 +50,7 @@ def run_buildpulse
with_env(HOMEBREW_NO_AUTO_UPDATE: "1", HOMEBREW_NO_BOOTSNAP: "1") do
ensure_formula_installed!("buildpulse-test-reporter",
- reason: "for reporting test flakiness")
+ reason: "reporting test flakiness")
... | true |
Other | Homebrew | brew | 9ef52080e37091467b477e3eb79dc9c9fb495591.json | utils: extract common word "for" in `reason` | Library/Homebrew/github_packages.rb | @@ -48,7 +48,7 @@ def upload_bottles(bottles_hash, keep_old:, dry_run:, warn_on_error:)
raise UsageError, "HOMEBREW_GITHUB_PACKAGES_USER is unset." if user.blank?
raise UsageError, "HOMEBREW_GITHUB_PACKAGES_TOKEN is unset." if token.blank?
- skopeo = ensure_executable!("skopeo", reason: "for upload")
+ ... | true |
Other | Homebrew | brew | 9ef52080e37091467b477e3eb79dc9c9fb495591.json | utils: extract common word "for" in `reason` | Library/Homebrew/style.rb | @@ -279,13 +279,13 @@ def shell_scripts
def shellcheck
# Always use the latest brewed shellcheck
ensure_formula_installed!("shellcheck", latest: true,
- reason: "for shell style checks").opt_bin/"shellcheck"
+ r... | true |
Other | Homebrew | brew | 9ef52080e37091467b477e3eb79dc9c9fb495591.json | utils: extract common word "for" in `reason` | Library/Homebrew/utils.rb | @@ -461,7 +461,7 @@ def ensure_formula_installed!(formula_or_name, latest: false, reason: "",
Formula[formula_or_name]
end
- reason = " #{reason}" if reason.present? # add a whitespace
+ reason = " for #{reason}" if reason.present?
unless formula.any_version_installed?
ohai "Installing... | true |
Other | Homebrew | brew | 466f29a16a173c2c381541884649f272fcf51357.json | cmd/update-report: redirect stdout to stderr when it is not a TTY | Library/Homebrew/cmd/update-report.rb | @@ -18,7 +18,7 @@ module Homebrew
def update_preinstall_header(args:)
@update_preinstall_header ||= begin
- ohai_stdout_or_stderr "Auto-updated Homebrew!" if args.preinstall?
+ ohai "Auto-updated Homebrew!" if args.preinstall?
true
end
end
@@ -40,12 +40,20 @@ def update_report_args
... | true |
Other | Homebrew | brew | 466f29a16a173c2c381541884649f272fcf51357.json | cmd/update-report: redirect stdout to stderr when it is not a TTY | Library/Homebrew/utils.rb | @@ -112,24 +112,6 @@ def ohai(title, *sput)
puts sput
end
- def ohai_stdout_or_stderr(message, *sput)
- if $stdout.tty?
- ohai(message, *sput)
- else
- $stderr.puts(ohai_title(message))
- $stderr.puts(sput)
- end
- end
-
- def puts_stdout_or_stderr(*message)
- message = "\n" if m... | true |
Other | Homebrew | brew | c0826f1890eaf11ddc1d9e1dfd83a44fc218d91b.json | utils: add method `ensure_executable!` | Library/Homebrew/github_packages.rb | @@ -48,13 +48,7 @@ def upload_bottles(bottles_hash, keep_old:, dry_run:, warn_on_error:)
raise UsageError, "HOMEBREW_GITHUB_PACKAGES_USER is unset." if user.blank?
raise UsageError, "HOMEBREW_GITHUB_PACKAGES_TOKEN is unset." if token.blank?
- skopeo = [
- which("skopeo"),
- which("skopeo", ENV[... | true |
Other | Homebrew | brew | c0826f1890eaf11ddc1d9e1dfd83a44fc218d91b.json | utils: add method `ensure_executable!` | Library/Homebrew/utils.rb | @@ -494,6 +494,20 @@ def ensure_formula_installed!(formula_or_name, latest: false, reason: "",
formula
end
+ # Ensure the given executable is exist otherwise install the brewed version
+ def ensure_executable!(name, formula_name = nil, reason: "")
+ formula_name ||= name
+
+ executable = [
+ whic... | true |
Other | Homebrew | brew | 3376479e955283c6b0bff6e64faf0e500714d733.json | utils: add method `ensure_formula_installed!` | Library/Homebrew/dev-cmd/bottle.rb | @@ -108,10 +108,7 @@ def bottle
def ensure_relocation_formulae_installed!
Keg.relocation_formulae.each do |f|
- next if Formula[f].latest_version_installed?
-
- ohai "Installing #{f}..."
- safe_system HOMEBREW_BREW_FILE, "install", f
+ ensure_formula_installed!(f, latest: true)
end
... | true |
Other | Homebrew | brew | 3376479e955283c6b0bff6e64faf0e500714d733.json | utils: add method `ensure_formula_installed!` | Library/Homebrew/dev-cmd/bump.rb | @@ -59,8 +59,7 @@ def bump
unless Utils::Curl.curl_supports_tls13?
begin
unless Pathname.new(ENV["HOMEBREW_BREWED_CURL_PATH"]).exist?
- ohai "Installing `curl` for Repology queries..."
- safe_system HOMEBREW_BREW_FILE, "install", "--formula", Formula["curl"].full_name
+ e... | true |
Other | Homebrew | brew | 3376479e955283c6b0bff6e64faf0e500714d733.json | utils: add method `ensure_formula_installed!` | Library/Homebrew/dev-cmd/cat.rb | @@ -31,18 +31,14 @@ def cat
cd HOMEBREW_REPOSITORY
pager = if Homebrew::EnvConfig.bat?
- require "formula"
-
- unless Formula["bat"].any_version_installed?
+ ENV["BAT_CONFIG_PATH"] = Homebrew::EnvConfig.bat_config_path
+ ensure_formula_installed!(
+ "bat",
+ "for displaying... | true |
Other | Homebrew | brew | 3376479e955283c6b0bff6e64faf0e500714d733.json | utils: add method `ensure_formula_installed!` | Library/Homebrew/dev-cmd/tests.rb | @@ -48,11 +48,9 @@ def use_buildpulse?
def run_buildpulse
require "formula"
- unless Formula["buildpulse-test-reporter"].any_version_installed?
- ohai "Installing `buildpulse-test-reporter` for reporting test flakiness..."
- with_env(HOMEBREW_NO_AUTO_UPDATE: "1", HOMEBREW_NO_BOOTSNAP: "1") do
- ... | true |
Other | Homebrew | brew | 3376479e955283c6b0bff6e64faf0e500714d733.json | utils: add method `ensure_formula_installed!` | Library/Homebrew/github_packages.rb | @@ -53,11 +53,7 @@ def upload_bottles(bottles_hash, keep_old:, dry_run:, warn_on_error:)
which("skopeo", ENV["HOMEBREW_PATH"]),
HOMEBREW_PREFIX/"bin/skopeo",
].compact.first
- unless skopeo.exist?
- ohai "Installing `skopeo` for upload..."
- safe_system HOMEBREW_BREW_FILE, "install", "--... | true |
Other | Homebrew | brew | 3376479e955283c6b0bff6e64faf0e500714d733.json | utils: add method `ensure_formula_installed!` | Library/Homebrew/style.rb | @@ -278,31 +278,12 @@ def shell_scripts
def shellcheck
# Always use the latest brewed shellcheck
- unless Formula["shellcheck"].latest_version_installed?
- if Formula["shellcheck"].any_version_installed?
- ohai "Upgrading `shellcheck` for shell style checks..."
- safe_system ... | true |
Other | Homebrew | brew | 3376479e955283c6b0bff6e64faf0e500714d733.json | utils: add method `ensure_formula_installed!` | Library/Homebrew/utils.rb | @@ -454,6 +454,47 @@ def redirect_stdout(file)
out.close
end
+ # Ensure the given formula is installed
+ # This is useful for installing a utility formula (e.g. `shellcheck` for `brew style`)
+ def ensure_formula_installed!(formula_or_name, reason = "", latest: false, linked: false,
+ ... | true |
Other | Homebrew | brew | 3376479e955283c6b0bff6e64faf0e500714d733.json | utils: add method `ensure_formula_installed!` | Library/Homebrew/utils/git.rb | @@ -100,7 +100,7 @@ def ensure_installed!
# and will also likely fail due to `OS::Linux` and `OS::Mac` being undefined.
raise "Refusing to install Git on a generic OS." if ENV["HOMEBREW_TEST_GENERIC_OS"]
- safe_system HOMEBREW_BREW_FILE, "install", "git"
+ ensure_formula_instal... | true |
Other | Homebrew | brew | c6719e58542df880648bec4de8e7114f33776eca.json | dev-cmd/cat: require "formula" only when necessary | Library/Homebrew/dev-cmd/cat.rb | @@ -2,7 +2,6 @@
# frozen_string_literal: true
require "cli/parser"
-require "formula"
module Homebrew
extend T::Sig
@@ -32,6 +31,8 @@ def cat
cd HOMEBREW_REPOSITORY
pager = if Homebrew::EnvConfig.bat?
+ require "formula"
+
unless Formula["bat"].any_version_installed?
# The use... | false |
Other | Homebrew | brew | 5657e109afb8a0c2a9cfaadf6b7aa2a872c5f7f0.json | Apply suggestions from code review | Library/Homebrew/dev-cmd/tap-new.rb | @@ -44,17 +44,7 @@ def tap_new
titleized_repo = tap.repo.dup
titleized_user[0] = titleized_user[0].upcase
titleized_repo[0] = titleized_repo[0].upcase
-
- pr_pull_env = {}
- pr_pull_env["HOMEBREW_GITHUB_API_TOKEN"] = "${{ github.token }}"
- pr_pull_env["PULL_REQUEST"] = "${{ github.event.pull_re... | false |
Other | Homebrew | brew | 97bc320836deb1195a1bf8f646a26c8c72ff845e.json | std_go_args: accept ldflags as string or Array(string) | Library/Homebrew/formula.rb | @@ -1528,10 +1528,13 @@ def std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework
end
# Standard parameters for Go builds.
- sig { params(output: T.any(String, Pathname), ldflags: T.nilable(String)).returns(T::Array[String]) }
+ sig {
+ params(output: T.any(String, Pathname),
+ ... | false |
Other | Homebrew | brew | 3f357861aa2dde712b02f2e2a05e30aefc0c4842.json | formula: allow optional output path in std_go_args | Library/Homebrew/formula.rb | @@ -1528,9 +1528,9 @@ def std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework
end
# Standard parameters for Go builds.
- sig { params(ldflags: T.nilable(String)).returns(T::Array[String]) }
- def std_go_args(ldflags: nil)
- args = ["-trimpath", "-o=#{bin/name}"]
+ sig { params(out... | false |
Other | Homebrew | brew | f8ded0a435700d1969a779d7b75047fbd2176d7a.json | PageMatch: Enforce requirements in #find_versions
This aligns `PageMatch` with how cask strategies handle requirements
in their `#find_versions` methods. This moves related logic from
`Livecheck#latest_version` into the `PageMatch` strategy, which feels
a bit more appropriate. | Library/Homebrew/livecheck/livecheck.rb | @@ -626,13 +626,10 @@ def latest_version(
end
if livecheck_strategy.present?
- if livecheck_strategy == :page_match && (livecheck_regex.blank? && livecheck_strategy_block.blank?)
- odebug "#{strategy_name} strategy requires a regex or block"
- next
- elsif liv... | true |
Other | Homebrew | brew | f8ded0a435700d1969a779d7b75047fbd2176d7a.json | PageMatch: Enforce requirements in #find_versions
This aligns `PageMatch` with how cask strategies handle requirements
in their `#find_versions` methods. This moves related logic from
`Livecheck#latest_version` into the `PageMatch` strategy, which feels
a bit more appropriate. | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -90,6 +90,10 @@ def self.versions_from_content(content, regex, &block)
).returns(T::Hash[Symbol, T.untyped])
}
def self.find_versions(url:, regex: nil, provided_content: nil, **_unused, &block)
+ if regex.blank? && block.blank?
+ raise ArgumentError, "#{T.must(name).d... | true |
Other | Homebrew | brew | e73524b09325c4aa2e45a945bb2a62fafdfda62f.json | livecheck: Fix debug strategy info printing
The `ExtractPlist` strategy doesn't return certain values (e.g.,
`:url`), so it's necessary to also ensure these values are present
before printing related debug info. Without these changes, we end up
printing info for a blank value (e.g., "URL (strategy):"). | Library/Homebrew/livecheck/livecheck.rb | @@ -658,9 +658,13 @@ def latest_version(
end
if debug
- puts "URL (strategy): #{strategy_data[:url]}" if strategy_data[:url] != url
- puts "URL (final): #{strategy_data[:final_url]}" if strategy_data[:final_url]
- puts "Regex (strategy): #{strategy_data[:regex].insp... | false |
Other | Homebrew | brew | 8f96ba3c1ebe789cbffab207e058ec21001cb4ca.json | extract: remove bottle blocks | Library/Homebrew/dev-cmd/extract.rb | @@ -64,6 +64,8 @@ module Homebrew
module_function
+ BOTTLE_BLOCK_REGEX = / bottle do.+?end\n\n/m.freeze
+
sig { returns(CLI::Parser) }
def extract_args
Homebrew::CLI::Parser.new do
@@ -184,7 +186,7 @@ def extract
result.sub!("class #{class_name} < Formula", "class #{versioned_name} < Formula")
... | false |
Other | Homebrew | brew | c4f57af057e1faa6d03c29c758bdb168f2870918.json | docs/Acceptable-Formulae: specifiy the list of supported platforms | docs/Acceptable-Formulae.md | @@ -5,6 +5,12 @@ Some formulae should not go in
additional [Interesting Taps and Forks](Interesting-Taps-and-Forks.md) and anyone can start their
own!
+### Supported platforms in `homebrew/core`
+
+The formula needs to build and pass tests on the latest 3 supported macOS versions ([x86_64 and Apple Silicon/ARM](Ins... | false |
Other | Homebrew | brew | 68f1685b97a574559157eed389c5c7393babafaa.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.23.0.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rubocop` gem.
# Please instead update this file by running `bin/tapioca gem rubocop`.
-# typed: true
-
module RuboCop; end
class RuboCop::CLI
@@ -1502,19 +1502,19 @@ module RuboCop::Cop::Gemspec... | true |
Other | Homebrew | brew | 68f1685b97a574559157eed389c5c7393babafaa.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -5105,7 +5105,10 @@ 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_INCLUDE_WITH_WITHOUT = ::T.let(nil, ::T.untyped)
+ SET_NEW_ = ::T.let(nil, ::T.untyped)
SET_SYSTEM_SHELL_OUTPUT_PIPE_O... | true |
Other | Homebrew | brew | fa3bf7804fa96340b6e004e7a5b54ef95f898a83.json | Update RBI files for rbi. | Library/Homebrew/sorbet/rbi/gems/rbi@0.0.7.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rbi` gem.
# Please instead update this file by running `bin/tapioca gem rbi`.
-# typed: true
-
module RBI; end
class RBI::ASTVisitor
@@ -108,6 +108,14 @@ class RBI::AttrWriter < ::RBI::Attr
d... | false |
Other | Homebrew | brew | d087e783d8b0db3efc5dffaf324d18d3bf004eb7.json | Update RBI files for mime-types. | Library/Homebrew/sorbet/rbi/gems/mime-types@3.4.1.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `mime-types` gem.
# Please instead update this file by running `bin/tapioca gem mime-types`.
-# typed: true
-
module MIME; end
class MIME::Type
@@ -38,6 +38,9 @@ class MIME::Type
def preferred... | false |
Other | Homebrew | brew | 84a979d76ba2fddf841afcbc4266bc18885ae291.json | Update RBI files for mime-types-data. | Library/Homebrew/sorbet/rbi/gems/mime-types-data@3.2021.1115.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `mime-types-data` gem.
# Please instead update this file by running `bin/tapioca gem mime-types-data`.
-# typed: true
-
module MIME; end
class MIME::Types | false |
Other | Homebrew | brew | c1531cd7b349dadd58e5ebb463ba2224570bb17b.json | Add line breaks & indentation | docs/Analytics.md | @@ -3,15 +3,18 @@
Homebrew gathers anonymous aggregate user behaviour analytics using Google Analytics. You will be notified the first time you run `brew update` or install Homebrew. Analytics are not enabled until after this notice is shown, to ensure that you can [opt out](Analytics.md#opting-out) without ever sendi... | true |
Other | Homebrew | brew | c1531cd7b349dadd58e5ebb463ba2224570bb17b.json | Add line breaks & indentation | docs/Bottles.md | @@ -3,19 +3,23 @@
Bottles are produced by installing a formula with `brew install --build-bottle <formula>` and then bottling it with `brew bottle <formula>`. This outputs the bottle DSL which should be inserted into the formula file.
## Usage
+
If a bottle is available and usable it will be downloaded and poured ... | true |
Other | Homebrew | brew | c1531cd7b349dadd58e5ebb463ba2224570bb17b.json | Add line breaks & indentation | docs/Interesting-Taps-and-Forks.md | @@ -1,31 +1,32 @@
# Interesting Taps & Forks
A [tap](Taps.md) is Homebrew-speak for a Git repository containing extra formulae.
+
Homebrew has the capability to add (and remove) multiple taps to your local installation with the `brew tap` and `brew untap` commands. Type `man brew` in your terminal. The main reposi... | true |
Other | Homebrew | brew | c1531cd7b349dadd58e5ebb463ba2224570bb17b.json | Add line breaks & indentation | docs/Taps.md | @@ -9,21 +9,23 @@ but the command isn't limited to any one location.
* `brew tap` without arguments lists the currently tapped repositories. For
example:
-```sh
-$ brew tap
-homebrew/core
-mistydemeo/tigerbrew
-dunn/emacs
-```
+ ```sh
+ $ brew tap
+ homebrew/core
+ mistydemeo/tigerbrew
+ dunn/emacs
+ ```
... | true |
Other | Homebrew | brew | c1531cd7b349dadd58e5ebb463ba2224570bb17b.json | Add line breaks & indentation | docs/Tips-N'-Tricks.md | @@ -16,6 +16,7 @@ This can be useful if a package can't build against the version of something you
And of course, you can simply `brew link <formula>` again afterwards!
## Pre-downloading a file for a formula
+
Sometimes it's faster to download a file via means other than those
strategies that are available as pa... | true |
Other | Homebrew | brew | 7bd5374dccd864f09314c51e9ed747bc1363f6e2.json | Revert "linkage_checker: check variable references with dlopen"
Trying to `dlopen` some Qt libraries causes Ruby to crash.
This reverts commit 0191a275ccc3e1a9377c956751bbc1c4ba7b0cea. | Library/Homebrew/linkage_checker.rb | @@ -32,7 +32,6 @@ def initialize(keg, formula = nil, cache_db:, rebuild_cache: false)
@unnecessary_deps = []
@unwanted_system_dylibs = []
@version_conflict_deps = []
- @broken_variable_dylibs = []
check_dylibs(rebuild_cache: rebuild_cache)
end
@@ -47,7 +46,6 @@ def display_normal_output
... | false |
Other | Homebrew | brew | 0191a275ccc3e1a9377c956751bbc1c4ba7b0cea.json | linkage_checker: check variable references with dlopen
The linkage check currently does nothing to check the validity of
variable-referenced libraries (prefixed with an `@`).
We could rectify that by mimicking the dynamic linker in looking up the
variable-referenced library, but this could get quite complicated.
Inst... | Library/Homebrew/linkage_checker.rb | @@ -32,6 +32,7 @@ def initialize(keg, formula = nil, cache_db:, rebuild_cache: false)
@unnecessary_deps = []
@unwanted_system_dylibs = []
@version_conflict_deps = []
+ @broken_variable_dylibs = []
check_dylibs(rebuild_cache: rebuild_cache)
end
@@ -46,6 +47,7 @@ def display_normal_output
... | false |
Other | Homebrew | brew | b4fd89c8113b073d1eee49fa46c2cce7743c650f.json | Update RBI files for mechanize. | Library/Homebrew/sorbet/rbi/gems/mechanize@2.8.3.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `mechanize` gem.
# Please instead update this file by running `bin/tapioca gem mechanize`.
-# typed: true
-
class HTTP::CookieJar
include ::Mechanize::CookieDeprecated
include ::Mechanize::Coo... | false |
Other | Homebrew | brew | 50cde98fd393a8faf8937af3177c2ec58486d07f.json | utils/shfmt.sh: allow single line if blocks | Library/Homebrew/utils/shfmt.sh | @@ -292,6 +292,7 @@ wrap_then_do() {
local -a processed=()
local -a buffer=()
local line
+ local singleline_if_then_fi_regex='^( *)if (.+)\; then (.+)\; fi( *#.*)?$'
local singleline_if_then_regex='^( *)(el)?if (.+)\; (then( *#.*)?)$'
local singleline_for_do_regex='^( *)(for|while) (.+)\; (do( *#.*)?)$'... | false |
Other | Homebrew | brew | 49de2b0c1ae56d31d5c59dc42c292475f57d4344.json | Check arch instead of the brand string | Library/Homebrew/brew.sh | @@ -6,6 +6,7 @@
# Doesn't need a default case because we don't support other OSs
# shellcheck disable=SC2249
HOMEBREW_PROCESSOR="$(uname -m)"
+HOMEBREW_PHYSICAL_PROCESSOR="${HOMEBREW_PROCESSOR}"
HOMEBREW_SYSTEM="$(uname -s)"
case "${HOMEBREW_SYSTEM}" in
Darwin) HOMEBREW_MACOS="1" ;;
@@ -17,12 +18,19 @@ esac
# ... | true |
Other | Homebrew | brew | 49de2b0c1ae56d31d5c59dc42c292475f57d4344.json | Check arch instead of the brand string | Library/Homebrew/cmd/vendor-install.sh | @@ -14,15 +14,16 @@ VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor"
# Built from https://github.com/Homebrew/homebrew-portable-ruby.
if [[ -n "${HOMEBREW_MACOS}" ]]
then
- if [[ "$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] ||
+ if [[ "${HOMEBREW_PHYSICAL_PROCESSOR}" == "x86_64" ]] ||
# Handle the ... | true |
Other | Homebrew | brew | 98b33e673200778b06f564bba26b60be7918e818.json | Remove another redundant conditional
This condition is always true when we've reached this branch. | Library/Homebrew/cmd/vendor-install.sh | @@ -22,8 +22,7 @@ then
then
ruby_FILENAME="portable-ruby-2.6.8.yosemite.bottle.tar.gz"
ruby_SHA="0cb1cc7af109437fe0e020c9f3b7b95c3c709b140bde9f991ad2c1433496dd42"
- elif [[ "$(sysctl -n machdep.cpu.brand_string)" == "Apple"* ]]
- then
+ else
ruby_FILENAME="portable-ruby-2.6.8.arm64_big_sur.bottle.t... | false |
Other | Homebrew | brew | fd1ca7e2b74a6fc0b5a3a8a0eadfcc808325308a.json | Remove redundant conditionals
Whenever the `sysctl` call does not match `"Apple"*`, we can be sure
that `HOMEBREW_PROCESSOR` is `Intel`, so there's no need for this
additional check. | Library/Homebrew/cmd/vendor-install.sh | @@ -14,8 +14,7 @@ VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor"
# Built from https://github.com/Homebrew/homebrew-portable-ruby.
if [[ -n "${HOMEBREW_MACOS}" ]]
then
- if [[ "${HOMEBREW_PROCESSOR}" == "Intel" &&
- "$(sysctl -n machdep.cpu.brand_string)" != "Apple"* ]] ||
+ if [[ "$(sysctl -n machdep.cpu.... | false |
Other | Homebrew | brew | 51ab1649fbc3653be8f3a1b7019da0ebbdacf582.json | Install Portable Ruby on native ARM installs
The previous commit only prevented the installation of an Intel Portable
Ruby into `/opt/homebrew` prefix. Let's actually install an ARM64
Portable Ruby there too. | Library/Homebrew/cmd/vendor-install.sh | @@ -23,7 +23,7 @@ then
then
ruby_FILENAME="portable-ruby-2.6.8.yosemite.bottle.tar.gz"
ruby_SHA="0cb1cc7af109437fe0e020c9f3b7b95c3c709b140bde9f991ad2c1433496dd42"
- elif [[ "${HOMEBREW_PROCESSOR}" == "arm64" ]]
+ elif [[ "$(sysctl -n machdep.cpu.brand_string)" == "Apple"* ]]
then
ruby_FILENAME="p... | false |
Other | Homebrew | brew | 8aeb28781c68fdb22ddfcca45501b19a29328bae.json | vendor-install: handle native ARM running under Rosetta
Since `HOMEBREW_PROCESSOR` is populated using `uname -m`, this will
register as `Intel` even when a native ARM install is running under
Rosetta.
Let's work around this by checking `sysctl -n machdep.cpu.brand_string`.
On my Intel machine:
❯ sysctl -n machde... | Library/Homebrew/cmd/vendor-install.sh | @@ -14,7 +14,8 @@ VENDOR_DIR="${HOMEBREW_LIBRARY}/Homebrew/vendor"
# Built from https://github.com/Homebrew/homebrew-portable-ruby.
if [[ -n "${HOMEBREW_MACOS}" ]]
then
- if [[ "${HOMEBREW_PROCESSOR}" == "Intel" ]] ||
+ if [[ "${HOMEBREW_PROCESSOR}" == "Intel" &&
+ "$(sysctl -n machdep.cpu.brand_string)" !=... | false |
Other | Homebrew | brew | 5b47c6540c3681d16d2dbec820596f64def1126d.json | tests.yml: resume preinstalling subversion | .github/workflows/tests.yml | @@ -305,6 +305,10 @@ jobs:
- name: Install brew tests dependencies
run: |
+ brew install subversion
+ brew sh -c "svn --homebrew=print-path"
+ which svn
+ which svnadmin
brew install curl
which curl
| false |
Other | Homebrew | brew | 508b48d19e1627db45d33b82e1a2159a010594a5.json | formula_installer: preinstall any pre-fetch dependencies | Library/Homebrew/dependency_collector.rb | @@ -45,7 +45,7 @@ def fetch(spec)
end
def cache_key(spec)
- if spec.is_a?(Resource) && spec.download_strategy == CurlDownloadStrategy
+ if spec.is_a?(Resource) && spec.download_strategy <= CurlDownloadStrategy
File.extname(spec.url)
else
spec
@@ -148,7 +148,7 @@ def resource_dep(spec, t... | true |
Other | Homebrew | brew | 508b48d19e1627db45d33b82e1a2159a010594a5.json | formula_installer: preinstall any pre-fetch dependencies | Library/Homebrew/formula_installer.rb | @@ -215,6 +215,7 @@ def prelude
forbidden_license_check
check_install_sanity
+ install_fetch_deps unless ignore_deps?
end
sig { void }
@@ -343,6 +344,19 @@ def check_install_sanity
"#{formula.full_name} requires the latest version of pinned dependencies"
end
+ sig { void }
+ def... | true |
Other | Homebrew | brew | d97798e805084ad70a774b44f2e8d2081dafc6be.json | Update RBI files for sorbet. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -4134,8 +4134,6 @@ class Pathname
include ::MachOShim
def fnmatch?(*arg); end
- def glob(*arg); end
-
def make_symlink(arg); end
end
| false |
Other | Homebrew | brew | 188265544bc5a65e80bfee31b0124794f7ae1add.json | cmd/vendor-install: add arm64 macOS portable-ruby build | Library/Homebrew/cmd/vendor-install.sh | @@ -22,6 +22,10 @@ then
then
ruby_FILENAME="portable-ruby-2.6.8.yosemite.bottle.tar.gz"
ruby_SHA="0cb1cc7af109437fe0e020c9f3b7b95c3c709b140bde9f991ad2c1433496dd42"
+ elif [[ "${HOMEBREW_PROCESSOR}" == "arm64" ]]
+ then
+ ruby_FILENAME="portable-ruby-2.6.8.arm64_big_sur.bottle.tar.gz"
+ ruby_SHA="f2... | false |
Other | Homebrew | brew | d0f6f7d52b22f813d428077ae68f297543416b47.json | Require Ruby 2.6.8 | Library/Homebrew/brew.sh | @@ -458,9 +458,7 @@ then
# Set a variable when the macOS system Ruby is new enough to avoid spawning
# a Ruby process unnecessarily.
- # On Catalina the system Ruby is technically new enough but don't allow it:
- # https://github.com/Homebrew/brew/issues/9410
- if [[ "${HOMEBREW_MACOS_VERSION_NUMERIC}" -lt "... | true |
Other | Homebrew | brew | d0f6f7d52b22f813d428077ae68f297543416b47.json | Require Ruby 2.6.8 | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -201,19 +201,12 @@ def check_if_xcode_needs_clt_installed
end
def check_ruby_version
- # TODO: require 2.6.8 for everyone once enough have updated to Monterey
- required_version = if MacOS.version >= :monterey ||
- ENV["HOMEBREW_RUBY_PATH"].to_s.include?("/v... | true |
Other | Homebrew | brew | d0f6f7d52b22f813d428077ae68f297543416b47.json | Require Ruby 2.6.8 | Library/Homebrew/utils/ruby.sh | @@ -1,4 +1,4 @@
-export HOMEBREW_REQUIRED_RUBY_VERSION=2.6.3
+export HOMEBREW_REQUIRED_RUBY_VERSION=2.6.8
# HOMEBREW_LIBRARY is from the user environment
# shellcheck disable=SC2154 | true |
Other | Homebrew | brew | 887a1408b00dd0688427a205e6ce746fa2f90fb6.json | Update RBI files for unparser. | Library/Homebrew/sorbet/rbi/gems/unparser@0.6.1.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `unparser` gem.
# Please instead update this file by running `bin/tapioca gem unparser`.
-# typed: true
-
module Unparser
class << self
def buffer(source, identification = T.unsafe(nil)); en... | false |
Other | Homebrew | brew | f241f0d12e906bb12de72be2e1dfa525ed49345e.json | Update RBI files for rubocop-rspec. | Library/Homebrew/sorbet/rbi/gems/rubocop-rspec@2.6.0.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rubocop-rspec` gem.
# Please instead update this file by running `bin/tapioca gem rubocop-rspec`.
-# typed: true
-
module RuboCop; end
module RuboCop::Cop; end
module RuboCop::Cop::Layout; end
@@... | false |
Other | Homebrew | brew | 66f5a2628473d7a27c68fe11e239885c279e8256.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.13.0.rbi | @@ -1,9 +1,9 @@
+# typed: true
+
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `rubocop-ast` gem.
# Please instead update this file by running `bin/tapioca gem rubocop-ast`.
-# typed: true
-
module RuboCop; end
module RuboCop::AST
@@ -225,6 +225,7 @@ module RuboCop::AST::Co... | false |
Other | Homebrew | brew | 9438dc94e3724bcf2456c1d550e3386ae0bc9d94.json | search: split missing formula help into its own method | Library/Homebrew/cmd/search.rb | @@ -143,14 +143,21 @@ def search_names(query, string_or_regex, args)
count = all_formulae.count + all_casks.count
- if $stdout.tty? && (reason = MissingFormula.reason(query, silent: true)) && local_casks.exclude?(query)
- if count.positive?
- puts
- puts "If you meant #{query.inspect} spe... | false |
Other | Homebrew | brew | b86fdfeb09e55678f5d35a738f55d7bc04dbfd54.json | style: use long options for `patch` command | Library/Homebrew/style.rb | @@ -167,7 +167,7 @@ def run_rubocop(files, output_type,
def run_shellcheck(files, output_type, fix: false)
files = shell_scripts if files.blank?
- files = files.map(&:realpath)
+ files = files.map(&:realpath) # use absolute file paths
args = [
"--shell=bash",
@@ -181,8 +181,13 ... | false |
Other | Homebrew | brew | 800bd93c5aa719f28b572c016d4f935519e6e48f.json | .vscode: add extension editorconfig | .vscode/extensions.json | @@ -5,6 +5,7 @@
"rebornix.ruby",
"wingrunr21.vscode-ruby",
"timonwong.shellcheck",
- "foxundermoon.shell-format"
+ "foxundermoon.shell-format",
+ "editorconfig.editorconfig"
]
} | false |
Other | Homebrew | brew | 0331cbeda3b0093b1554e31eb7e66dbaf7ac0b8f.json | utils/shfmt.sh: use utils/shfmt.sh as shell script formmatter | .vscode/settings.json | @@ -13,5 +13,9 @@
"--external-sources",
"--source-path=${workspaceFolder}/Library"
],
- "shellformat.flag": "-i 2 -ci"
+ "shellformat.effectLanguages": [
+ "shellscript"
+ ],
+ "shellformat.path": "${workspaceFolder}/Library/Homebrew/utils/shfmt.sh",
+ "shellformat.flag": "-i 2 -ci -ln bash"
} | true |
Other | Homebrew | brew | 0331cbeda3b0093b1554e31eb7e66dbaf7ac0b8f.json | utils/shfmt.sh: use utils/shfmt.sh as shell script formmatter | Library/Homebrew/utils/shfmt.sh | @@ -35,6 +35,10 @@ then
if [[ -x "$(PATH="${HOMEBREW_PATH}" command -v diff)" ]]
then
DIFF="$(PATH="${HOMEBREW_PATH}" command -v diff)" # fall back to `diff` in PATH without coloring
+ elif [[ -z "${HOMEBREW_PATH}" && -x "$(command -v diff)" ]]
+ then
+ # HOMEBREW_PATH may unset if shfmt.sh is called by... | true |
Other | Homebrew | brew | 67c619d4f28b27ba9e33fadc149123fe237df4a1.json | style: use popen_write to apply patches | Library/Homebrew/style.rb | @@ -181,8 +181,9 @@ def run_shellcheck(files, output_type, fix: false)
]
if fix
- patch = system_command shellcheck, args: ["--format=diff", *args]
- system_command "patch", args: ["-d", "/", "-p0"], input: patch.stdout
+ patches = system_command(shellcheck, args: ["--format=diff", ... | false |
Other | Homebrew | brew | 38ebaac869bacedd89aa885b0dadafa59874774d.json | dev-cmd/bottle: fix pkg_version comparison on merge | Library/Homebrew/dev-cmd/bottle.rb | @@ -626,9 +626,15 @@ def merge(args:)
path = HOMEBREW_REPOSITORY/bottle_hash["formula"]["path"]
formula = Formulary.factory(path)
+
old_bottle_spec = formula.bottle_specification
+ old_pkg_version = formula.pkg_version
+ FormulaVersions.new(formula).formula_at_revision("origin/HEAD") do... | false |
Other | Homebrew | brew | cf7def0c68903814c6b4e04a55fe8f3cb3f5605e.json | style: apply shellcheck autofix | Library/Homebrew/cmd/update.sh | @@ -657,7 +657,7 @@ EOS
if [[ "${UPSTREAM_SHA_HTTP_CODE}" == "404" ]]
then
- TAP="${DIR#${HOMEBREW_LIBRARY}/Taps/}"
+ TAP="${DIR#"${HOMEBREW_LIBRARY}"/Taps/}"
echo "${TAP} does not exist! Run \`brew untap ${TAP}\` to remove it." >>"${update_failed_file}"
... | true |
Other | Homebrew | brew | cf7def0c68903814c6b4e04a55fe8f3cb3f5605e.json | style: apply shellcheck autofix | Library/Homebrew/completions/bash.erb | @@ -105,7 +105,7 @@ __brew_complete_tapped() {
for dir in "${taplib}"/*/*
do
[[ -d "${dir}" ]] || continue
- dir="${dir#${taplib}/}"
+ dir="${dir#"${taplib}"/}"
dir="${dir/homebrew-/}"
taps="${taps} ${dir}"
done | true |
Other | Homebrew | brew | cf7def0c68903814c6b4e04a55fe8f3cb3f5605e.json | style: apply shellcheck autofix | bin/brew | @@ -2,6 +2,7 @@
# Fail fast with concise message when not using bash
# Single brackets is needed here for POSIX compatibility
+# shellcheck disable=SC2292
if [ -z "${BASH_VERSION:-}" ]
then
echo "Error: Bash is required to run brew." >&2 | true |
Other | Homebrew | brew | cf7def0c68903814c6b4e04a55fe8f3cb3f5605e.json | style: apply shellcheck autofix | completions/bash/brew | @@ -92,7 +92,7 @@ __brew_complete_tapped() {
for dir in "${taplib}"/*/*
do
[[ -d "${dir}" ]] || continue
- dir="${dir#${taplib}/}"
+ dir="${dir#"${taplib}"/}"
dir="${dir/homebrew-/}"
taps="${taps} ${dir}"
done | true |
Other | Homebrew | brew | 00ebd8581ff3cdb1ac547d3a97cda3cb3a0aa012.json | style: apply shellcheck autofix | Library/Homebrew/cmd/update.sh | @@ -657,7 +657,7 @@ EOS
if [[ "${UPSTREAM_SHA_HTTP_CODE}" == "404" ]]
then
- TAP="${DIR#${HOMEBREW_LIBRARY}/Taps/}"
+ TAP="${DIR#"${HOMEBREW_LIBRARY}"/Taps/}"
echo "${TAP} does not exist! Run \`brew untap ${TAP}\` to remove it." >>"${update_failed_file}"
... | true |
Other | Homebrew | brew | 00ebd8581ff3cdb1ac547d3a97cda3cb3a0aa012.json | style: apply shellcheck autofix | Library/Homebrew/completions/bash.erb | @@ -105,7 +105,7 @@ __brew_complete_tapped() {
for dir in "${taplib}"/*/*
do
[[ -d "${dir}" ]] || continue
- dir="${dir#${taplib}/}"
+ dir="${dir#"${taplib}"/}"
dir="${dir/homebrew-/}"
taps="${taps} ${dir}"
done | true |
Other | Homebrew | brew | 00ebd8581ff3cdb1ac547d3a97cda3cb3a0aa012.json | style: apply shellcheck autofix | bin/brew | @@ -2,6 +2,7 @@
# Fail fast with concise message when not using bash
# Single brackets is needed here for POSIX compatibility
+# shellcheck disable=SC2292
if [ -z "${BASH_VERSION:-}" ]
then
echo "Error: Bash is required to run brew." >&2 | true |
Other | Homebrew | brew | 00ebd8581ff3cdb1ac547d3a97cda3cb3a0aa012.json | style: apply shellcheck autofix | completions/bash/brew | @@ -92,7 +92,7 @@ __brew_complete_tapped() {
for dir in "${taplib}"/*/*
do
[[ -d "${dir}" ]] || continue
- dir="${dir#${taplib}/}"
+ dir="${dir#"${taplib}"/}"
dir="${dir/homebrew-/}"
taps="${taps} ${dir}"
done | true |
Other | Homebrew | brew | 25bc1d88604ad396b9c63e82d21c64021562c4f7.json | Service: add interval support | Library/Homebrew/service.rb | @@ -9,14 +9,14 @@ class Service
extend T::Sig
extend Forwardable
- RUN_TYPE_IMMEDIATE = "immediate"
- RUN_TYPE_INTERVAL = "interval"
- RUN_TYPE_CRON = "cron"
+ RUN_TYPE_IMMEDIATE = :immediate
+ RUN_TYPE_INTERVAL = :interval
+ RUN_TYPE_CRON = :cron
- PROCESS_TYPE_BACKGROUND = "backgrou... | true |
Other | Homebrew | brew | 25bc1d88604ad396b9c63e82d21c64021562c4f7.json | Service: add interval support | Library/Homebrew/test/service_spec.rb | @@ -32,6 +32,28 @@
end
end
+ describe "#run_type" do
+ it "throws for cron type" do
+ f.class.service do
+ run opt_bin/"beanstalkd"
+ run_type :cron
+ end
+
+ expect { f.service.manual_command }.to raise_error TypeError, "Service#run_type does not support cron"
+ end
+
+ ... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/cask/exceptions.rb | @@ -153,24 +153,6 @@ def to_s
end
end
- # Error when a cask depends on X11.
- #
- # @api private
- class CaskX11DependencyError < AbstractCaskErrorWithToken
- extend T::Sig
-
- sig { returns(String) }
- def to_s
- <<~EOS
- Cask '#{token}' requires XQuartz/X11, which can be installed u... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/extend/ENV/super.rb | @@ -20,7 +20,7 @@ module Superenv
include SharedEnvExtension
# @private
- attr_accessor :keg_only_deps, :deps, :run_time_deps, :x11
+ attr_accessor :keg_only_deps, :deps, :run_time_deps
sig { params(base: Superenv).void }
def self.extended(base)
@@ -168,17 +168,11 @@ def determine_pkg_config_libdir
... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -268,17 +268,6 @@ def check_xcode_license_approved
EOS
end
- def check_xquartz_up_to_date
- return unless MacOS::XQuartz.outdated?
-
- <<~EOS
- Your XQuartz (#{MacOS::XQuartz.version}) is outdated.
- Please install XQuartz #{MacOS::XQuartz.latest_version} (or de... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/extend/os/mac/extend/ENV/super.rb | @@ -21,34 +21,16 @@ def bin
end
end
- alias x11? x11
-
- undef homebrew_extra_paths,
- homebrew_extra_pkg_config_paths, homebrew_extra_aclocal_paths,
+ undef homebrew_extra_pkg_config_paths,
homebrew_extra_isystem_paths, homebrew_extra_library_paths,
homebrew_extra_cmake_include_pa... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/extend/os/mac/system_config.rb | @@ -38,16 +38,11 @@ def clt
@clt ||= MacOS::CLT.version if MacOS::CLT.installed?
end
- def xquartz
- @xquartz ||= "#{MacOS::XQuartz.version} => #{describe_path(MacOS::XQuartz.prefix)}" if MacOS::XQuartz.installed?
- end
-
def dump_verbose_config(f = $stdout)
dump_generic_verbose_con... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/os/mac.rb | @@ -3,7 +3,6 @@
require "os/mac/version"
require "os/mac/xcode"
-require "os/mac/xquartz"
require "os/mac/sdk"
require "os/mac/keg"
| true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/os/mac/xquartz.rb | @@ -1,129 +0,0 @@
-# typed: true
-# frozen_string_literal: true
-
-module OS
- module Mac
- # Helper module for querying XQuartz information.
- #
- # @api private
- module XQuartz
- extend T::Sig
-
- module_function
-
- DEFAULT_BUNDLE_PATH = Pathname("/Applications/Utilities/XQuartz.app").fr... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/rubocops/lines.rb | @@ -55,7 +55,6 @@ def audit_formula(_node, _class_node, _parent_class_node, _body_node)
"# if this fails, try separate make/make install steps",
"# The URL of the archive",
"## Naming --",
- "# if your formula requires any X11/XQuartz components",
... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/test/cask/dsl_spec.rb | @@ -409,16 +409,6 @@ def caveats
end
end
- describe "depends_on x11" do
- context "with invalid depends_on x11 value" do
- let(:token) { "invalid/invalid-depends-on-x11-value" }
-
- it "refuses to load" do
- expect { cask }.to raise_error(Cask::CaskInvalidError)
- end
- end
- end... | true |
Other | Homebrew | brew | 4836ea0ba2119619697af87edf5fdb2280e90238.json | Remove XQuartz handling | Library/Homebrew/test/cask/installer_spec.rb | @@ -4,7 +4,7 @@
describe Cask::Installer, :cask do
describe "install" do
let(:empty_depends_on_stub) {
- double(formula: [], cask: [], macos: nil, arch: nil, x11: nil)
+ double(formula: [], cask: [], macos: nil, arch: nil)
}
it "downloads and installs a nice fresh Cask" do | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.