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 | cee86846ce1115fc4fd85010526104c292280d7f.json | Fix Sorbet violations. | Library/Homebrew/cli/args.rb | @@ -68,7 +68,7 @@ def no_named?
def build_from_source_formulae
if build_from_source? || self[:HEAD?] || self[:build_bottle?]
- named.to_formulae_and_casks.select { |f| f.is_a?(Formula) }.map(&:full_name)
+ named.to_formulae.map(&:full_name)
else
[]
end | true |
Other | Homebrew | brew | cee86846ce1115fc4fd85010526104c292280d7f.json | Fix Sorbet violations. | Library/Homebrew/cmd/home.rb | @@ -36,7 +36,9 @@ def home
return
end
- homepages = args.named.to_formulae_and_casks.map do |formula_or_cask|
+ # to_formulae_and_casks is typed to possibly return Kegs (but won't without explicitly asking)
+ formulae_or_casks = T.cast(args.named.to_formulae_and_casks, T::Array[T.any(Formula, Cas... | true |
Other | Homebrew | brew | cee86846ce1115fc4fd85010526104c292280d7f.json | Fix Sorbet violations. | Library/Homebrew/sorbet/parlour.rb | @@ -1,25 +1,27 @@
-# frozen_string_literal: true
# typed: true
+# frozen_string_literal: true
require_relative "../warnings"
Warnings.ignore :parser_syntax do
require "parser/current"
end
module Homebrew
+ # Parlour type signature generator helper class for Homebrew.
module Parlour
extend T::Sig
... | true |
Other | Homebrew | brew | cee86846ce1115fc4fd85010526104c292280d7f.json | Fix Sorbet violations. | Library/Homebrew/sorbet/parlour/attr.rb | @@ -1,6 +1,7 @@
-# frozen_string_literal: true
# typed: strict
+# frozen_string_literal: true
+# Parlour type signature generator plugin for Homebrew DSL attributes.
class Attr < Parlour::Plugin
sig { override.params(root: Parlour::RbiGenerator::Namespace).void }
def generate(root)
@@ -13,7 +14,7 @@ def gener... | true |
Other | Homebrew | brew | cee86846ce1115fc4fd85010526104c292280d7f.json | Fix Sorbet violations. | Library/Homebrew/version.rb | @@ -39,6 +39,7 @@ def self.create(val)
when /\A#{PostToken::PATTERN}\z/o then PostToken
when /\A#{NumericToken::PATTERN}\z/o then NumericToken
when /\A#{StringToken::PATTERN}\z/o then StringToken
+ else raise "Cannot find a matching token pattern"
end.new(val)
end
| true |
Other | Homebrew | brew | cee86846ce1115fc4fd85010526104c292280d7f.json | Fix Sorbet violations. | Library/Homebrew/yard/ignore_directives.rbi | @@ -0,0 +1,6 @@
+# typed: strict
+
+module YARD
+ class Docstring; end
+ class DocstringParser; end
+end | true |
Other | Homebrew | brew | f84265f9a200c693525b16260386f9c2b523aa48.json | Remove extra type signatures | Library/Homebrew/extend/os/linux/api/analytics.rb | @@ -5,7 +5,6 @@ module Homebrew
module API
module Analytics
class << self
- sig { returns(String) }
def analytics_api_path
return generic_analytics_api_path if Homebrew::EnvConfig.force_homebrew_on_linux?
| true |
Other | Homebrew | brew | f84265f9a200c693525b16260386f9c2b523aa48.json | Remove extra type signatures | Library/Homebrew/extend/os/linux/api/bottle.rb | @@ -5,7 +5,6 @@ module Homebrew
module API
module Bottle
class << self
- sig { returns(String) }
def bottle_api_path
return generic_bottle_api_path if Homebrew::EnvConfig.force_homebrew_on_linux?
| true |
Other | Homebrew | brew | f84265f9a200c693525b16260386f9c2b523aa48.json | Remove extra type signatures | Library/Homebrew/extend/os/linux/api/formula.rb | @@ -5,7 +5,6 @@ module Homebrew
module API
module Formula
class << self
- sig { returns(String) }
def formula_api_path
return generic_formula_api_path if Homebrew::EnvConfig.force_homebrew_on_linux?
| true |
Other | Homebrew | brew | 2afbd38dde4f371ec4a120aa46f77e7738bce5f2.json | Remove extra comment | Library/Homebrew/api/bottle.rb | @@ -5,7 +5,7 @@
module Homebrew
module API
- # Helper functions for using the Bottle JSON API.
+ # Helper functions for using the bottle JSON API.
#
# @api private
module Bottle | true |
Other | Homebrew | brew | 2afbd38dde4f371ec4a120aa46f77e7738bce5f2.json | Remove extra comment | Library/Homebrew/test/api/bottle_spec.rb | @@ -4,10 +4,6 @@
require "api"
describe Homebrew::API::Bottle do
- # before do
- # ENV["HOMEBREW_JSON_CORE"] = "1"
- # end
-
let(:bottle_json) {
<<~EOS
{ | true |
Other | Homebrew | brew | faeb8942490c16fc99de34b0fc496664a40277da.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.24.rbi | @@ -1615,7 +1615,7 @@ class Tapioca::RBI::Rewriters::SortNodes < ::Tapioca::RBI::Visitor
private
sig { params(kind: Tapioca::RBI::Group::Kind).returns(Integer) }
- def kind_rank(kind); end
+ def group_rank(kind); end
sig { params(node: Tapioca::RBI::Node).returns(T.nilable(String)) }
def node_name(nod... | false |
Other | Homebrew | brew | 285513fd6517d9d408793d31b02af81f2cc514ad.json | Allow anonymous access in private registries | Library/Homebrew/download_strategy.rb | @@ -568,8 +568,7 @@ class CurlGitHubPackagesDownloadStrategy < CurlDownloadStrategy
def initialize(url, name, version, **meta)
meta ||= {}
meta[:headers] ||= []
- token = Homebrew::EnvConfig.docker_registry_token
- token ||= "QQ=="
+ token = Homebrew::EnvConfig.artifact_domain ? Homebrew::EnvConfi... | false |
Other | Homebrew | brew | 1e737dbe2cffc0c19fa8a4a1529d84c16a9cc418.json | cmd/shellenv.sh: apply suggestions from code review | 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.
-#: The variables and ... | true |
Other | Homebrew | brew | 1e737dbe2cffc0c19fa8a4a1529d84c16a9cc418.json | cmd/shellenv.sh: apply suggestions from code review | Library/Homebrew/env_config.rb | @@ -305,14 +305,6 @@ module EnvConfig
"useful to avoid long-running Homebrew commands being killed due to no output.",
boolean: true,
},
- HOMEBREW_SHELLENV_PREFIX: {
- description: "The lastest Homebrew prefix initialized by `brew shellenv`. If it is ... | true |
Other | Homebrew | brew | 1e737dbe2cffc0c19fa8a4a1529d84c16a9cc418.json | cmd/shellenv.sh: apply suggestions from code review | docs/Manpage.md | @@ -565,7 +565,7 @@ The search for *`text`* is extended online to `homebrew/core` and `homebrew/cask
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 a... | true |
Other | Homebrew | brew | 1e737dbe2cffc0c19fa8a4a1529d84c16a9cc418.json | cmd/shellenv.sh: apply suggestions from code review | manpages/brew.1 | @@ -784,7 +784,7 @@ Search for \fItext\fR in the given database\.
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_REPOSITORY\fR are also ... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/apache.rb | @@ -52,7 +52,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/bitbucket.rb | @@ -59,7 +59,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/cpan.rb | @@ -50,7 +50,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/electron_builder.rb | @@ -37,19 +37,24 @@ def self.match?(url)
sig {
params(
content: String,
- block: T.nilable(T.proc.params(arg0: Hash).returns(String)),
+ block: T.nilable(T.proc.params(arg0: T::Hash[String, T.untyped]).returns(T.nilable(String))),
).returns(T.nilable... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/extract_plist.rb | @@ -56,7 +56,7 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: Cask::Cask,
- block: T.nilable(T.proc.params(arg0: T::Hash[String, Item]).returns(String)),
+ block: T.nilable(T.proc.params(arg0: T::Hash[String, Item]).returns(T.nilable(... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/git.rb | @@ -81,8 +81,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: T::Array[String])
- .returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ ... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/github_latest.rb | @@ -67,7 +67,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/gnome.rb | @@ -55,7 +55,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/gnu.rb | @@ -59,7 +59,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/hackage.rb | @@ -52,7 +52,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/header_match.rb | @@ -40,8 +40,7 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: T::Hash[String, String])
- .returns(T.any(T::Array[String], String))),
+ block: T.nilable(T.proc.pa... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/launchpad.rb | @@ -50,7 +50,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/npm.rb | @@ -46,7 +46,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/page_match.rb | @@ -45,13 +45,24 @@ def self.match?(url)
# @param regex [Regexp] a regex used for matching versions in the
# content
# @return [Array]
+ sig {
+ params(
+ content: String,
+ regex: Regexp,
+ block: T.nilable(
+ T.proc.params(... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/pypi.rb | @@ -56,7 +56,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/sourceforge.rb | @@ -62,7 +62,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/sparkle.rb | @@ -144,7 +144,7 @@ def self.item_from_content(content)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: Item).returns(String)),
+ block: T.nilable(T.proc.params(arg0: Item).returns(T.nilable(String... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/livecheck/strategy/xorg.rb | @@ -85,7 +85,9 @@ def self.match?(url)
url: String,
regex: T.nilable(Regexp),
cask: T.nilable(Cask::Cask),
- block: T.nilable(T.proc.params(arg0: String).returns(T.any(T::Array[String], String))),
+ block: T.nilable(
+ T.proc.params(arg0: Stri... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/test/livecheck/strategy/electron_builder_spec.rb | @@ -54,5 +54,14 @@
expect(version).to eq "1.2.4"
end
+
+ it "allows a nil return from a strategy block" do
+ expect(electron_builder.version_from_content(electron_builder_yaml) { next }).to eq(nil)
+ end
+
+ it "errors on an invalid return type from a strategy block" do
+ expect { elect... | true |
Other | Homebrew | brew | a970780851dc048be35323b4798406b82528609e.json | livecheck: allow nil return from strategy blocks | Library/Homebrew/test/livecheck/strategy/page_match_spec.rb | @@ -72,9 +72,13 @@
end
it "finds matching text in page content using a strategy block" do
- expect(page_match.page_matches(page_content, regex) { |content| content.scan(regex).map(&:first).uniq })
+ expect(page_match.page_matches(page_content, regex) { |content, regex| content.scan(regex).map(&:fi... | true |
Other | Homebrew | brew | 0bc3d6cf4b8134120be2d1aff2af86eaf0f3aaf8.json | docs: add livecheck formula/cask reference example | docs/Brew-Livecheck.md | @@ -96,6 +96,18 @@ end
If tags include the software name as a prefix (e.g. `example-1.2.3`), it's easy to modify the regex accordingly: `/^example[._-]v?(\d+(?:\.\d+)+)$/i`
+### Referenced formula/cask
+
+A formula/cask can use the same check as another by using `formula` or `cask`.
+
+```ruby
+livecheck do
+ for... | false |
Other | Homebrew | brew | ddde0f7589b9c04f53869cf39f4c5e01f772b3d7.json | livecheck: allow inheriting from a formula/cask | Library/Homebrew/livecheck.rb | @@ -18,13 +18,51 @@ class Livecheck
def initialize(formula_or_cask)
@formula_or_cask = formula_or_cask
+ @referenced_cask_name = nil
+ @referenced_formula_name = nil
@regex = nil
@skip = false
@skip_msg = nil
@strategy = nil
@url = nil
end
+ # Sets the `@referenced_cask_na... | true |
Other | Homebrew | brew | ddde0f7589b9c04f53869cf39f4c5e01f772b3d7.json | livecheck: allow inheriting from a formula/cask | Library/Homebrew/livecheck/livecheck.rb | @@ -9,6 +9,8 @@
require "uri"
module Homebrew
+ # rubocop:disable Metrics/ModuleLength
+
# The {Livecheck} module consists of methods used by the `brew livecheck`
# command. These methods print the requested livecheck information
# for formulae.
@@ -82,6 +84,74 @@ def load_other_tap_strategies(formulae_an... | true |
Other | Homebrew | brew | ddde0f7589b9c04f53869cf39f4c5e01f772b3d7.json | livecheck: allow inheriting from a formula/cask | Library/Homebrew/livecheck/skip_conditions.rb | @@ -201,6 +201,54 @@ def skip_information(formula_or_cask, full_name: false, verbose: false)
{}
end
+ # Skip conditions for formulae/casks referenced in a `livecheck` block
+ # are treated differently than normal. We only respect certain skip
+ # conditions (returning the related hash) ... | true |
Other | Homebrew | brew | ddde0f7589b9c04f53869cf39f4c5e01f772b3d7.json | livecheck: allow inheriting from a formula/cask | Library/Homebrew/rubocops/livecheck.rb | @@ -50,6 +50,10 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
skip = find_every_method_call_by_name(livecheck_node, :skip).first
return if skip.present?
+ formula_node = find_every_method_call_by_name(livecheck_node, :formula).first
+ cask_node = find_... | true |
Other | Homebrew | brew | ddde0f7589b9c04f53869cf39f4c5e01f772b3d7.json | livecheck: allow inheriting from a formula/cask | Library/Homebrew/test/livecheck/livecheck_spec.rb | @@ -44,6 +44,15 @@
RUBY
end
+ describe "::resolve_livecheck_reference" do
+ context "when a formula/cask has a livecheck block without formula/cask methods" do
+ it "returns [nil, []]" do
+ expect(livecheck.resolve_livecheck_reference(f)).to eq([nil, []])
+ expect(livecheck.resolve_live... | true |
Other | Homebrew | brew | ddde0f7589b9c04f53869cf39f4c5e01f772b3d7.json | livecheck: allow inheriting from a formula/cask | Library/Homebrew/test/livecheck/skip_conditions_spec.rb | @@ -264,7 +264,7 @@
}
end
- describe "::skip_conditions" do
+ describe "::skip_information" do
context "when a formula without a livecheckable is deprecated" do
it "skips" do
expect(skip_conditions.skip_information(formulae[:deprecated]))
@@ -293,21 +293,21 @@
end
end
- ... | true |
Other | Homebrew | brew | ddde0f7589b9c04f53869cf39f4c5e01f772b3d7.json | livecheck: allow inheriting from a formula/cask | Library/Homebrew/test/livecheck_spec.rb | @@ -28,6 +28,40 @@
end
let(:livecheckable_c) { described_class.new(c) }
+ describe "#formula" do
+ it "returns nil if not set" do
+ expect(livecheckable_f.formula).to be nil
+ end
+
+ it "returns the String if set" do
+ livecheckable_f.formula("other-formula")
+ expect(livecheckable_f.f... | true |
Other | Homebrew | brew | 7cc37fb7f869971b1c3efe82730274d48063c89a.json | cmd/shellenv.sh: support multi-instance installation | Library/Homebrew/cmd/shellenv.sh | @@ -15,31 +15,31 @@ homebrew-shellenv() {
echo "set -gx HOMEBREW_PREFIX \"${HOMEBREW_PREFIX}\";"
echo "set -gx HOMEBREW_CELLAR \"${HOMEBREW_CELLAR}\";"
echo "set -gx HOMEBREW_REPOSITORY \"${HOMEBREW_REPOSITORY}\";"
- [[ -n "${HOMEBREW_SHELLENV_SET}" ]] && return
+ [[ ":${HOMEBREW_SHELLENV... | true |
Other | Homebrew | brew | 7cc37fb7f869971b1c3efe82730274d48063c89a.json | cmd/shellenv.sh: support multi-instance installation | Library/Homebrew/env_config.rb | @@ -306,8 +306,8 @@ module EnvConfig
boolean: true,
},
HOMEBREW_SHELLENV_SET: {
- description: "If set, `brew shellenv` skips export statements for paths.",
- boolean: true,
+ description: "A colon separated list of brew prefixes. If it is set and con... | true |
Other | Homebrew | brew | 7cc37fb7f869971b1c3efe82730274d48063c89a.json | cmd/shellenv.sh: support multi-instance installation | docs/Manpage.md | @@ -2089,7 +2089,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
<br>If set, verbose output will print a `.` no more than once a minute. This can be useful to avoid long-running Homebrew commands being killed due to no output.
- `HOMEBREW_SHELLENV_SET`
- <br>If set, `brew shellenv` sk... | true |
Other | Homebrew | brew | 7cc37fb7f869971b1c3efe82730274d48063c89a.json | cmd/shellenv.sh: support multi-instance installation | manpages/brew.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW" "1" "July 2021" "Homebrew" "brew"
+.TH "BREW" "1" "August 2021" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS (or Linux)
@@ -3043,7 +3043,7 @@ If set, verbose output wil... | true |
Other | Homebrew | brew | 34c1a6f850261022ceca4c09faef1e3124bfcf40.json | gist-logs: grab files in subdirectories too | Library/Homebrew/cmd/gist-logs.rb | @@ -92,15 +92,19 @@ def noecho_gets
result
end
- def load_logs(dir)
+ def load_logs(dir, basedir = dir)
logs = {}
if dir.exist?
dir.children.sort.each do |file|
- contents = file.size? ? file.read : "empty log"
- # small enough to avoid GitHub "unicorn" page-load-timeout error... | false |
Other | Homebrew | brew | 29e648dd8954442c5dc4cbc08921c34acb664ad1.json | .github/ISSUE_TEMPLATE/bug.yml: add instructions for mirror sites bug reporting | .github/ISSUE_TEMPLATE/bug.yml | @@ -11,6 +11,9 @@ body:
label: "`brew config` output"
validations:
required: true
+ - type: markdown
+ attributes:
+ value: If you are using `HOMEBREW_BOTTLE_DOMAIN` or `HOMEBREW_ARTIFACT_DOMAIN` to configure Homebrew mirrors, please first try unsetting those variables. If this bug is relate... | false |
Other | Homebrew | brew | c1f68c70536fe15e20678fef61c093b25ef99685.json | sorbet: Update RBI files.
Autogenerated by the [sorbet](https://github.com/Homebrew/brew/blob/master/.github/workflows/sorbet.yml) workflow. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -8361,6 +8361,8 @@ module Homebrew::EnvConfig
def self.display_install_times?(); end
+ def self.docker_registry_token(); end
+
def self.editor(); end
def self.fail_log_lines(); end | false |
Other | Homebrew | brew | 391b02f870e7db3d3208729ab636372f6677daf4.json | formula_installer: install service after linking | Library/Homebrew/formula_installer.rb | @@ -754,11 +754,11 @@ def finish
ohai "Finishing up" if verbose?
- install_service
-
keg = Keg.new(formula.prefix)
link(keg)
+ install_service
+
fix_dynamic_linkage(keg) if !@poured_bottle || !formula.bottle_specification.skip_relocation?
if build_bottle? | false |
Other | Homebrew | brew | 869b0ea519ce1d18303d62c75a136a09a30361a8.json | Formula: use opt_prefix for service helpers | Library/Homebrew/formula.rb | @@ -986,13 +986,13 @@ def service_name
# The generated launchd {.plist} file path.
sig { returns(Pathname) }
def plist_path
- prefix/"#{plist_name}.plist"
+ opt_prefix/"#{plist_name}.plist"
end
# The generated systemd {.service} file path.
sig { returns(Pathname) }
def systemd_service_path
... | true |
Other | Homebrew | brew | 869b0ea519ce1d18303d62c75a136a09a30361a8.json | Formula: use opt_prefix for service helpers | Library/Homebrew/test/formula_installer_spec.rb | @@ -223,7 +223,7 @@ class #{Formulary.class_s(dep_name)} < Formula
it "works if plist is set" do
formula = Testball.new
path = formula.plist_path
- formula.prefix.mkpath
+ formula.opt_prefix.mkpath
expect(formula).to receive(:plist).twice.and_return("PLIST")
expect(formula).... | true |
Other | Homebrew | brew | 869b0ea519ce1d18303d62c75a136a09a30361a8.json | Formula: use opt_prefix for service helpers | Library/Homebrew/test/formula_spec.rb | @@ -701,31 +701,52 @@
end
end
- specify "#service" do
- f = formula do
- url "https://brew.sh/test-1.0.tbz"
+ describe "#service" do
+ specify "no service defined" do
+ f = formula do
+ url "https://brew.sh/test-1.0.tbz"
+ end
+
+ expect(f.service).to eq(nil)
end
- ... | true |
Other | Homebrew | brew | cc12738f8e31b5a674057a2945fdbda7c2c12825.json | Allow anonymous access in private registries | Library/Homebrew/download_strategy.rb | @@ -566,8 +566,8 @@ class CurlGitHubPackagesDownloadStrategy < CurlDownloadStrategy
def initialize(url, name, version, **meta)
meta ||= {}
meta[:headers] ||= []
- token = ENV.fetch("HOMEBREW_REGISTRY_ACCESS_TOKEN", "QQ==")
- meta[:headers] << ["Authorization: Bearer #{token}"]
+ token = Homebrew::... | false |
Other | Homebrew | brew | b8954030e36b69508f3aa6747b9af04f1efaad92.json | Add support for private registry | Library/Homebrew/download_strategy.rb | @@ -449,7 +449,7 @@ def resolve_url_basename_time_file_size(url, timeout: nil)
return @resolved_info_cache[url] if @resolved_info_cache.include?(url)
if (domain = Homebrew::EnvConfig.artifact_domain)
- url = url.sub(%r{^((ht|f)tps?://)?}, "#{domain.chomp("/")}/")
+ url = url.sub(%r{^((ht|f)tps?://... | true |
Other | Homebrew | brew | b8954030e36b69508f3aa6747b9af04f1efaad92.json | Add support for private registry | Library/Homebrew/env_config.rb | @@ -170,6 +170,10 @@ module EnvConfig
description: "Use this GitHub personal access token when accessing the GitHub Packages Registry "\
"(where bottles may be stored).",
},
+ HOMEBREW_REGISTRY_ACCESS_TOKEN: {
+ description: "Use this bearer token for authentica... | true |
Other | Homebrew | brew | a8527f4c16d7df419f6539fd583302635ec98a4a.json | Ensure writability, handle errors | Library/Homebrew/formula.rb | @@ -1582,6 +1582,10 @@ def time
end
end
+ # Replaces a universal binary with its native slice.
+ #
+ # If called with no parameters, does this with all compatible
+ # universal binaries in a {Formula}'s {Keg}.
sig { params(targets: T.nilable(T.any(Pathname, String))).void }
def deuniversalize_machos... | false |
Other | Homebrew | brew | 485c9777d30a2635da4ac096e6db188c1923722b.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.18.4.rbi | @@ -793,6 +793,7 @@ class RuboCop::ConfigValidator
def msg_not_boolean(parent, key, value); end
def reject_conflicting_safe_settings; end
def reject_mutually_exclusive_defaults; end
+ def suggestion(name); end
def target_ruby; end
def validate_enforced_styles(valid_cop_names); end
def validate_new_co... | false |
Other | Homebrew | brew | 778d5df6d4bf44b832a4d15ade004227cac1b328.json | add qlplugins check to guess_cask_version | Library/Homebrew/unversioned_cask_checker.rb | @@ -122,8 +122,8 @@ def all_versions
sig { returns(T.nilable(String)) }
def guess_cask_version
- if apps.empty? && pkgs.empty?
- opoo "Cask #{cask} does not contain any apps or PKG installers."
+ if apps.empty? && pkgs.empty? && qlplugins.empty?
+ opoo "Cask #{cask} does not contain ... | false |
Other | Homebrew | brew | 5e0b786da21564011be7df165ce20a61d639de77.json | formula: add `deuniversalize_machos` method
This method takes an optional array of `Pathnames`s or `Strings`s and
extracts the native slice from the specified universal binary. If no
parameter is supplied, this is done on all compatible universal binaries
in a formula's keg.
`deuniversalize_machos` is a no-op on Linu... | Library/Homebrew/extend/os/linux/formula.rb | @@ -4,7 +4,9 @@
class Formula
undef shared_library
undef rpath
+ undef deuniversalize_machos
+ sig { params(name: String, version: T.nilable(T.any(String, Integer))).returns(String) }
def shared_library(name, version = nil)
suffix = if version == "*" || (name == "*" && version.blank?)
"{,.*}"
... | true |
Other | Homebrew | brew | 5e0b786da21564011be7df165ce20a61d639de77.json | formula: add `deuniversalize_machos` method
This method takes an optional array of `Pathnames`s or `Strings`s and
extracts the native slice from the specified universal binary. If no
parameter is supplied, this is done on all compatible universal binaries
in a formula's keg.
`deuniversalize_machos` is a no-op on Linu... | Library/Homebrew/formula.rb | @@ -1582,6 +1582,21 @@ def time
end
end
+ sig { params(targets: T.nilable(T.any(Pathname, String))).void }
+ def deuniversalize_machos(*targets)
+ if targets.blank?
+ targets = any_installed_keg.mach_o_files.select do |file|
+ file.arch == :universal && file.archs.include?(Hardware::CPU.arch)... | true |
Other | Homebrew | brew | 78ad5a870cee79255cc24fb632734e7a700548dd.json | formula_installer: add `tap_audit_exception` stub
`FormulaInstaller` calls `audit_installed` at install time, which
invokes methods in `FormulaCellarChecks`. One of these methods makes a
call to `tap_audit_exception` (cf. #11750), but this method isn't
visible in `FormulaInstaller`.
Instead of trying to replicate the... | Library/Homebrew/formula_installer.rb | @@ -1196,6 +1196,12 @@ def audit_installed
super
end
+ # This is a stub for calls made to this method at install time.
+ # Exceptions are correctly identified when doing `brew audit`.
+ def tap_audit_exception(*)
+ true
+ end
+
def self.locked
@locked ||= []
end | false |
Other | Homebrew | brew | 2fe77f52717e9b688a2e2f4c57c0404022a3afee.json | Formula: Allow configuration of std_cargo_args | Library/Homebrew/formula.rb | @@ -1479,9 +1479,9 @@ def std_configure_args
end
# Standard parameters for cargo builds.
- sig { returns(T::Array[T.any(String, Pathname)]) }
- def std_cargo_args
- ["--locked", "--root", prefix, "--path", "."]
+ sig { params(root: String, path: String).returns(T::Array[T.any(String, Pathname)]) }
+ def ... | false |
Other | Homebrew | brew | 81d89803db83510f58360993176c3719449364c6.json | Remove extra `HOMEBREW_NO_DEV_CMD_MESSAGE` line | Library/Homebrew/dev-cmd/tests.rb | @@ -87,7 +87,6 @@ def tests
ENV.delete(env)
end
- ENV["HOMEBREW_NO_DEV_CMD_MESSAGE"] = "1"
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ENV["HOMEBREW_NO_COMPAT"] = "1" if args.no_compat?
ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if args.generic? | false |
Other | Homebrew | brew | 27ba803bb593a6c07e4dd36634660e8d6881aa48.json | Remove need for `HOMEBREW_NO_DEV_CMD_MESSAGE` | Library/Homebrew/brew.rb | @@ -93,7 +93,7 @@ class MissingEnvironmentVariables < RuntimeError; end
internal_cmd ||= begin
internal_dev_cmd = Commands.valid_internal_dev_cmd?(cmd)
if internal_dev_cmd && !Homebrew::EnvConfig.developer?
- if ENV["HOMEBREW_DEV_CMD_RUN"].blank? && !Homebrew::EnvConfig.no_dev_cmd_message?
+ ... | true |
Other | Homebrew | brew | 27ba803bb593a6c07e4dd36634660e8d6881aa48.json | Remove need for `HOMEBREW_NO_DEV_CMD_MESSAGE` | Library/Homebrew/brew.sh | @@ -645,7 +645,7 @@ elif [[ -f "${HOMEBREW_LIBRARY}/Homebrew/dev-cmd/${HOMEBREW_COMMAND}.sh" ]]
then
if [[ -z "${HOMEBREW_DEVELOPER}" ]]
then
- if [[ -z "${HOMEBREW_DEV_CMD_RUN}" ]] && [[ -z "${HOMEBREW_NO_DEV_CMD_MESSAGE}" ]]
+ if [[ -z "${HOMEBREW_DEV_CMD_RUN}" ]]
then
message="$(bold "${HOME... | true |
Other | Homebrew | brew | 27ba803bb593a6c07e4dd36634660e8d6881aa48.json | Remove need for `HOMEBREW_NO_DEV_CMD_MESSAGE` | Library/Homebrew/env_config.rb | @@ -235,10 +235,6 @@ module EnvConfig
description: "If set, disable all use of legacy compatibility code.",
boolean: true,
},
- HOMEBREW_NO_DEV_CMD_MESSAGE: {
- description: "If set, do not display a warning message when running a developer command for the first time.... | true |
Other | Homebrew | brew | 27ba803bb593a6c07e4dd36634660e8d6881aa48.json | Remove need for `HOMEBREW_NO_DEV_CMD_MESSAGE` | Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb | @@ -83,6 +83,7 @@ def brew(*args)
"HOMEBREW_INTEGRATION_TEST" => command_id_from_args(args),
"HOMEBREW_TEST_TMPDIR" => TEST_TMPDIR,
"HOMEBREW_DEVELOPER" => ENV["HOMEBREW_DEVELOPER"],
+ "HOMEBREW_DEV_CMD_RUN" => "true",
"GEM_HOME" => nil,
)
| true |
Other | Homebrew | brew | 27ba803bb593a6c07e4dd36634660e8d6881aa48.json | Remove need for `HOMEBREW_NO_DEV_CMD_MESSAGE` | docs/Manpage.md | @@ -2027,9 +2027,6 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
- `HOMEBREW_NO_COMPAT`
<br>If set, disable all use of legacy compatibility code.
-- `HOMEBREW_NO_DEV_CMD_MESSAGE`
- <br>If set, do not display a warning message when running a developer command for the first time.
-
- `... | true |
Other | Homebrew | brew | 27ba803bb593a6c07e4dd36634660e8d6881aa48.json | Remove need for `HOMEBREW_NO_DEV_CMD_MESSAGE` | manpages/brew.1 | @@ -2923,12 +2923,6 @@ If set, do not print text with colour added\.
If set, disable all use of legacy compatibility code\.
.
.TP
-\fBHOMEBREW_NO_DEV_CMD_MESSAGE\fR
-.
-.br
-If set, do not display a warning message when running a developer command for the first time\.
-.
-.TP
\fBHOMEBREW_NO_EMOJI\fR
.
.br | true |
Other | Homebrew | brew | 55cc1eb8b098283cd280cf91974890fadcf808f4.json | Check `tap_audit_exception` only if tap is present | Library/Homebrew/formula_cellar_checks.rb | @@ -330,7 +330,8 @@ def check_binary_arches(formula)
end
mismatches -= compatible_universal_binaries
- universal_binaries_expected = tap_audit_exception(:universal_binary_allowlist, formula.name)
+ universal_binaries_expected =
+ formula.tap.present? && tap_audit_exception(:universal_binary_allow... | false |
Other | Homebrew | brew | 1678a3785e1e04a6976e723a9e176defd2ab41f4.json | Fix logic in `check_binary_arches` | Library/Homebrew/formula_cellar_checks.rb | @@ -323,14 +323,15 @@ def check_binary_arches(formula)
mismatches = keg.binary_executable_or_library_files.reject do |file|
file.arch == Hardware::CPU.arch
end
+ return if mismatches.empty?
compatible_universal_binaries = mismatches.select do |file|
file.arch == :universal && file.arch... | false |
Other | Homebrew | brew | a14d8924de63afbbd44dce7fabaa4411cb5e7837.json | extract: ignore syntax errors during load | Library/Homebrew/dev-cmd/extract.rb | @@ -226,6 +226,6 @@ def formula_at_revision(repo, name, file, rev)
contents = Utils::Git.last_revision_of_file(repo, file, before_commit: rev)
contents.gsub!("@url=", "url ")
contents.gsub!("require 'brewkit'", "require 'formula'")
- with_monkey_patch { Formulary.from_contents(name, file, contents) }
... | true |
Other | Homebrew | brew | a14d8924de63afbbd44dce7fabaa4411cb5e7837.json | extract: ignore syntax errors during load | Library/Homebrew/test/dev-cmd/extract_spec.rb | @@ -14,9 +14,17 @@
core_tap = CoreTap.new
core_tap.path.cd do
system "git", "init"
- formula_file = setup_test_formula "testball"
+ # Start with deprecated bottle syntax
+ setup_test_formula "testball", bottle_block: <<~EOS
+
+ bottle do
+ cellar :any
+ ... | true |
Other | Homebrew | brew | ae788550f9b5599e308b7f3b7ff8bef96c4387e6.json | Show replacement command in `odeprecated`
Co-authored-by: Rylan Polster <rslpolster@gmail.com> | Library/Homebrew/dev-cmd/pr-automerge.rb | @@ -43,7 +43,7 @@ def pr_automerge_args
def pr_automerge
args = pr_automerge_args.parse
- odeprecated "`brew pr-automerge --autosquash`" if args.autosquash?
+ odeprecated "`brew pr-automerge --autosquash`", "`brew pr-automerge`" if args.autosquash?
without_labels = args.without_labels || [
... | true |
Other | Homebrew | brew | ae788550f9b5599e308b7f3b7ff8bef96c4387e6.json | Show replacement command in `odeprecated`
Co-authored-by: Rylan Polster <rslpolster@gmail.com> | Library/Homebrew/dev-cmd/pr-publish.rb | @@ -43,7 +43,7 @@ def pr_publish
workflow = args.workflow || "publish-commit-bottles.yml"
ref = args.branch || "master"
- odeprecated "`brew pr-publish --autosquash`" if args.autosquash?
+ odeprecated "`brew pr-publish --autosquash`", "`brew pr-publish`" if args.autosquash?
extra_args = []
... | true |
Other | Homebrew | brew | 9370c7cca702b9535b78f328b60a14bb70bbc15d.json | Fix logic error in pr-automerge
Co-authored-by: Rylan Polster <rslpolster@gmail.com> | Library/Homebrew/dev-cmd/pr-automerge.rb | @@ -76,7 +76,7 @@ def pr_automerge
publish_args = ["pr-publish"]
publish_args << "--tap=#{tap}" if tap
- publish_args << "--autosquash" unless args.no_autosquash?
+ publish_args << "--no-autosquash" if args.no_autosquash?
if args.publish?
safe_system HOMEBREW_BREW_FILE, *publish_args, *pr_... | false |
Other | Homebrew | brew | 75a38b7187788b61461a0b76b7033bf96a33c1c1.json | refactor the format | Library/Homebrew/cask/quarantine.rb | @@ -31,7 +31,7 @@ def xattr
def check_quarantine_support
odebug "Checking quarantine support"
- if !system_command(xattr, args:[ "-h" ], print_stderr: false).success?
+ if !system_command(xattr, args: ["-h"], print_stderr: false).success?
odebug "There's no working version of `xattr` on... | true |
Other | Homebrew | brew | 75a38b7187788b61461a0b76b7033bf96a33c1c1.json | refactor the format | Library/Homebrew/diagnostic.rb | @@ -1000,7 +1000,7 @@ def check_cask_environment_variables
end
def check_cask_xattr
- result = system_command "/usr/bin/xattr", args: [ "-h" ]
+ result = system_command "/usr/bin/xattr", args: ["-h"]
return if result.status.success?
| true |
Other | Homebrew | brew | 654d10d6d3bec8775d836ae04266cdbac224e0dc.json | Fix more typos
Co-authored-by: Rylan Polster <rslpolster@gmail.com> | Library/Homebrew/dev-cmd/pr-automerge.rb | @@ -31,7 +31,7 @@ def pr_automerge_args
description: "Instruct `brew pr-publish` to automatically reformat and reword commits "\
"in the pull request to our preferred format."
switch "--no-autosquash",
- description: "Instruct `brew pr-publish` to skip automat... | false |
Other | Homebrew | brew | 5b7921ff68abcd3a4f9063cd8671299ffcf8f2d1.json | Add support for GitHub Oauth tokens from keychain | Library/Homebrew/utils/github/api.rb | @@ -21,7 +21,7 @@ module GitHub
#{ALL_SCOPES_URL}
#{Utils::Shell.set_variable_in_profile("HOMEBREW_GITHUB_API_TOKEN", "your_token_here")}
EOS
- GITHUB_PERSONAL_ACCESS_TOKEN_REGEX = /^(?:[a-f0-9]{40}|ghp_\w{36,251})$/.freeze
+ GITHUB_PERSONAL_ACCESS_TOKEN_REGEX = /^(?:[a-f0-9]{40}|gh[po]_\w{36,251})... | false |
Other | Homebrew | brew | 488ccfdf70762127bd21f36492748d407b3e9fc6.json | formula_cellar_checks: check keg for mismatched arches
There have been a few instances I've noticed that we've been silently
installing binaries built for x86_64 on ARM. There's probably more that
I haven't found yet, so it seems useful to check this with an audit. | Library/Homebrew/formula_cellar_checks.rb | @@ -314,6 +314,22 @@ def check_cpuid_instruction(formula)
"No `cpuid` instruction detected. #{formula} should not use `ENV.runtime_cpu_detection`."
end
+ def check_binary_arches(formula)
+ return unless formula.prefix.directory?
+
+ keg = Keg.new(formula.prefix)
+ mismatches = keg.binary_executable_... | true |
Other | Homebrew | brew | 488ccfdf70762127bd21f36492748d407b3e9fc6.json | formula_cellar_checks: check keg for mismatched arches
There have been a few instances I've noticed that we've been silently
installing binaries built for x86_64 on ARM. There's probably more that
I haven't found yet, so it seems useful to check this with an audit. | Library/Homebrew/os/mac/mach.rb | @@ -29,7 +29,7 @@ def mach_data
machos.each do |m|
arch = case m.cputype
- when :x86_64, :i386, :ppc64 then m.cputype
+ when :x86_64, :i386, :ppc64, :arm64, :arm then m.cputype
when :ppc then :ppc7400
else :dunno
end | true |
Other | Homebrew | brew | 2888d050f78f047fb82ec97709483978b6d74728.json | reject build and test dependency | Library/Homebrew/cask_dependent.rb | @@ -16,8 +16,9 @@ def full_name
end
def runtime_dependencies(ignore_missing: false)
- recursive_dependencies(ignore_missing: ignore_missing).select do |dependency|
- dependency.tags.blank?
+ recursive_dependencies(ignore_missing: ignore_missing).reject do |dependency|
+ tags = dependency.tags
+ ... | false |
Other | Homebrew | brew | 5de162f71a288c7c4b2e02a7c1b99f720036d930.json | installed_dependents: reject build formula | Library/Homebrew/installed_dependents.rb | @@ -51,7 +51,9 @@ def find_some_installed_dependents(kegs, casks: [])
dependent.missing_dependencies(hide: keg_names)
when Cask::Cask
# When checking for cask dependents, we don't care about missing dependencies
- CaskDependent.new(dependent).runtime_dependencies(ignore_missing: true).ma... | false |
Other | Homebrew | brew | c9ddbc3780d76966fd410b662df1438c9aa4561f.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/gems/rubocop-ast@1.8.0.rbi | @@ -364,6 +364,7 @@ RuboCop::AST::Builder::NODE_MAP = T.let(T.unsafe(nil), Hash)
class RuboCop::AST::CaseMatchNode < ::RuboCop::AST::Node
include ::RuboCop::AST::ConditionalNode
+ def branches; end
def each_in_pattern(&block); end
def else?; end
def else_branch; end
@@ -1637,10 +1638,12 @@ RuboCop::AST:... | true |
Other | Homebrew | brew | c9ddbc3780d76966fd410b662df1438c9aa4561f.json | Update RBI files for rubocop-ast. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -26895,12 +26895,8 @@ class RuboCop::AST::NodePattern::Parser
end
module RuboCop::AST::NodePattern::Sets
- SET_BEGINNING_OF_DAY_BEGINNING_OF_WEEK_BEGINNING_OF_MONTH_ETC = ::T.let(nil, ::T.untyped)
- SET_BRANCH_REF_TAG = ::T.let(nil, ::T.untyped)
SET_BUILD_RECOMMENDED_TEST_OPTIONAL = ::T.let(nil, ::T.untyped... | true |
Other | Homebrew | brew | 5649d339d7861f197b06f7f35c8bfdf46fdd217e.json | Show message when developer mode is turned on | Library/Homebrew/brew.rb | @@ -93,6 +93,13 @@ class MissingEnvironmentVariables < RuntimeError; end
internal_cmd ||= begin
internal_dev_cmd = Commands.valid_internal_dev_cmd?(cmd)
if internal_dev_cmd && !Homebrew::EnvConfig.developer?
+ opoo <<~MESSAGE if ENV["HOMEBREW_DEV_CMD_RUN"].blank?
+ #{Tty.bold}#{cmd}#{... | true |
Other | Homebrew | brew | 5649d339d7861f197b06f7f35c8bfdf46fdd217e.json | Show message when developer mode is turned on | Library/Homebrew/brew.sh | @@ -81,6 +81,30 @@ ohai() {
fi
}
+opoo() {
+ if [[ -n "${HOMEBREW_COLOR}" || (-t 2 && -z "${HOMEBREW_NO_COLOR}") ]] # check whether stderr is a tty.
+ then
+ echo -ne "\\033[4;33mWarning\\033[0m: " >&2 # highlight Warning with underline and yellow color
+ else
+ echo -n "Warning: " >&2
+ fi
+ if [[ $# ... | true |
Other | Homebrew | brew | 82c57566904147393065d06ff30ecdb899470c6e.json | dev-cmd/bottle: use native Ruby.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> | Library/Homebrew/dev-cmd/bottle.rb | @@ -400,7 +400,7 @@ def bottle_formula(f, args:)
# Set the times for reproducible bottles.
if file.symlink?
# Need to make symlink permissions consistent on macOS and Linux
- system "chmod", "-h", "0777", file if OS.mac?
+ File.lchmod 0777, file if OS.mac?
... | false |
Other | Homebrew | brew | 41b0bf7bbb84495c82987f2fba7cf029d8abef11.json | Add `developer` command | Library/Homebrew/cmd/developer.rb | @@ -0,0 +1,53 @@
+# typed: true
+# frozen_string_literal: true
+
+require "cli/parser"
+
+module Homebrew
+ extend T::Sig
+
+ module_function
+
+ sig { returns(CLI::Parser) }
+ def developer_args
+ Homebrew::CLI::Parser.new do
+ description <<~EOS
+ Control Homebrew's developer mode. When developer m... | true |
Other | Homebrew | brew | 41b0bf7bbb84495c82987f2fba7cf029d8abef11.json | Add `developer` command | Library/Homebrew/test/cmd/developer_spec.rb | @@ -0,0 +1,8 @@
+# typed: false
+# frozen_string_literal: true
+
+require "cmd/shared_examples/args_parse"
+
+describe "brew developer" do
+ it_behaves_like "parseable arguments"
+end | true |
Other | Homebrew | brew | 41b0bf7bbb84495c82987f2fba7cf029d8abef11.json | Add `developer` command | completions/bash/brew | @@ -745,6 +745,23 @@ _brew_desc() {
__brew_complete_formulae
}
+_brew_developer() {
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "${cur}" in
+ -*)
+ __brewcomp "
+ --debug
+ --help
+ --quiet
+ --verbose
+ "
+ return
+ ;;
+ *)
+ esac
+ __brewcomp "state on off"
+... | true |
Other | Homebrew | brew | 41b0bf7bbb84495c82987f2fba7cf029d8abef11.json | Add `developer` command | completions/fish/brew.fish | @@ -577,6 +577,16 @@ __fish_brew_complete_arg 'desc' -l verbose -d 'Make some output more verbose'
__fish_brew_complete_arg 'desc' -a '(__fish_brew_suggest_formulae_all)'
+__fish_brew_complete_cmd 'developer' 'Control Homebrew\'s developer mode'
+__fish_brew_complete_sub_cmd 'developer' 'state'
+__fish_brew_comple... | true |
Other | Homebrew | brew | 41b0bf7bbb84495c82987f2fba7cf029d8abef11.json | Add `developer` command | completions/internal_commands_list.txt | @@ -30,6 +30,7 @@ configure
create
deps
desc
+developer
dispatch-build-bottle
doctor
dr | true |
Other | Homebrew | brew | 41b0bf7bbb84495c82987f2fba7cf029d8abef11.json | Add `developer` command | completions/zsh/_brew | @@ -155,6 +155,7 @@ __brew_internal_commands() {
'create:Generate a formula or, with `--cask`, a cask for the downloadable file at URL and open it in the editor'
'deps:Show dependencies for formula'
'desc:Display formula'\''s name and one-line description'
+ 'developer:Control Homebrew'\''s developer ... | true |
Other | Homebrew | brew | 41b0bf7bbb84495c82987f2fba7cf029d8abef11.json | Add `developer` command | docs/Manpage.md | @@ -184,6 +184,18 @@ first search, making that search slower than subsequent ones.
* `-d`, `--description`:
Search just descriptions for *`text`*. If *`text`* is flanked by slashes, it is interpreted as a regular expression.
+### `developer` [*`subcommand`*]
+
+Control Homebrew's developer mode. When developer mo... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.