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 | 60876eed88639777d905d93b68a9d6ac729fe4b2.json | Improve Bootsnap behaviour
- further refactor nested conditional to make it clearer
- allow running on Linux while still excluding Apple Silicon
- only warn on `bundle install` failures | Library/Homebrew/homebrew_bootsnap.rb | @@ -1,32 +1,30 @@
# typed: false
# frozen_string_literal: true
-homebrew_bootsnap_enabled = !ENV["HOMEBREW_NO_BOOTSNAP"] &&
- ENV["HOMEBREW_BOOTSNAP"] &&
- # portable ruby doesn't play nice with bootsnap
- !ENV["HOMEBREW_FORCE_VENDOR_R... | true |
Other | Homebrew | brew | 60876eed88639777d905d93b68a9d6ac729fe4b2.json | Improve Bootsnap behaviour
- further refactor nested conditional to make it clearer
- allow running on Linux while still excluding Apple Silicon
- only warn on `bundle install` failures | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -532,6 +532,14 @@ class ActiveSupport::CurrentAttributes
def _reset_callbacks(); end
def _run_reset_callbacks(&block); end
+
+ def attributes(); end
+
+ def attributes=(attributes); end
+
+ def reset(); end
+
+ def set(set_attributes); end
end
class ActiveSupport::CurrentAttributes
@@ -553,9 +561,17 ... | true |
Other | Homebrew | brew | 60876eed88639777d905d93b68a9d6ac729fe4b2.json | Improve Bootsnap behaviour
- further refactor nested conditional to make it clearer
- allow running on Linux while still excluding Apple Silicon
- only warn on `bundle install` failures | Library/Homebrew/utils/gems.rb | @@ -34,6 +34,14 @@ def ohai_if_defined(message)
end
end
+ def opoo_if_defined(message)
+ if defined?(opoo)
+ $stderr.opoo message
+ else
+ $stderr.puts "Warning: #{message}"
+ end
+ end
+
def odie_if_defined(message)
if defined?(odie)
odie message
@@ -105,7 +113,7 @@ def in... | true |
Other | Homebrew | brew | 60876eed88639777d905d93b68a9d6ac729fe4b2.json | Improve Bootsnap behaviour
- further refactor nested conditional to make it clearer
- allow running on Linux while still excluding Apple Silicon
- only warn on `bundle install` failures | Library/Homebrew/utils/gems.rbi | @@ -22,6 +22,6 @@ module Homebrew
sig { void }
def install_bundler!; end
- sig { void }
- def install_bundler_gems!; end
+ sig { params(only_warn_on_failure: T::Boolean).void }
+ def install_bundler_gems!(only_warn_on_failure: false); end
end | true |
Other | Homebrew | brew | f079373d8c56086a6b4357eaa06c3c50410a3c1d.json | utils/fork: handle termsig in safe_fork | Library/Homebrew/build.rb | @@ -240,7 +240,14 @@ def fixopt(f)
error_hash["env"] = e.env
when "ErrorDuringExecution"
error_hash["cmd"] = e.cmd
- error_hash["status"] = e.status.exitstatus
+ error_hash["status"] = if e.status.is_a?(Process::Status)
+ {
+ exitstatus: e.status.exitstatus,
+ termsig: e.status.... | true |
Other | Homebrew | brew | f079373d8c56086a6b4357eaa06c3c50410a3c1d.json | utils/fork: handle termsig in safe_fork | Library/Homebrew/exceptions.rb | @@ -579,19 +579,32 @@ def initialize(cmd, status:, output: nil, secrets: [])
@status = status
@output = output
+ raise ArgumentError, "Status cannot be nil." if status.nil?
+
exitstatus = case status
when Integer
status
+ when Hash
+ status["exitstatus"]
+ else
+ status.e... | true |
Other | Homebrew | brew | f079373d8c56086a6b4357eaa06c3c50410a3c1d.json | utils/fork: handle termsig in safe_fork | Library/Homebrew/test/error_during_execution_spec.rb | @@ -5,7 +5,7 @@
subject(:error) { described_class.new(command, status: status, output: output) }
let(:command) { ["false"] }
- let(:status) { instance_double(Process::Status, exitstatus: exitstatus) }
+ let(:status) { instance_double(Process::Status, exitstatus: exitstatus, termsig: nil) }
let(:exitstatus)... | true |
Other | Homebrew | brew | f079373d8c56086a6b4357eaa06c3c50410a3c1d.json | utils/fork: handle termsig in safe_fork | Library/Homebrew/test/exceptions_spec.rb | @@ -186,7 +186,7 @@ class Baz < Formula; end
describe ErrorDuringExecution do
subject { described_class.new(["badprg", "arg1", "arg2"], status: status) }
- let(:status) { instance_double(Process::Status, exitstatus: 17) }
+ let(:status) { instance_double(Process::Status, exitstatus: 17, termsig: nil) }
... | true |
Other | Homebrew | brew | f079373d8c56086a6b4357eaa06c3c50410a3c1d.json | utils/fork: handle termsig in safe_fork | Library/Homebrew/utils/fork.rb | @@ -51,7 +51,14 @@ def self.safe_fork
# to rescue them further down.
if e.is_a?(ErrorDuringExecution)
error_hash["cmd"] = e.cmd
- error_hash["status"] = e.status.exitstatus
+ error_hash["status"] = if e.status.is_a?(Process::Status)
+ {
+ ... | true |
Other | Homebrew | brew | e85149cbc4cfeb7df45b9596502ae426e539c04c.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 | @@ -2689,6 +2689,11 @@ class Addrinfo
def connect_internal(local_addrinfo, timeout=T.unsafe(nil)); end
end
+class Archive
+ extend ::T::Private::Methods::MethodHooks
+ extend ::T::Private::Methods::SingletonMethodHooks
+end
+
class Array
include ::MessagePack::CoreExt
def compact_blank!(); end
@@ -8146,6... | false |
Other | Homebrew | brew | c4787a0a8b315e296fe4523b7e50c392eb07b8a5.json | pr-upload: Fix a typo affecting Internet Archive | Library/Homebrew/dev-cmd/pr-upload.rb | @@ -52,7 +52,7 @@ def check_bottled_formulae(bottles_hash)
def archive?(bottles_hash)
@archive ||= bottles_hash.values.all? do |bottle_hash|
- bottle_hash["bottle"]["root_url"].start_with? "https://archive.com/"
+ bottle_hash["bottle"]["root_url"].start_with? "https://archive.org/"
end
end
| false |
Other | Homebrew | brew | 634efba2615db158adeba1d56fc0ebf873b4c71b.json | homebrew_bootsnap: require some developer tools.
Do a very basic developer tools check to ensure that we can compile
things. We cannot use `DevelopmentTools.installed?` because this has
much higher speed requirements and needs to be run before we `require`
anything else. | Library/Homebrew/homebrew_bootsnap.rb | @@ -1,14 +1,24 @@
# typed: false
# frozen_string_literal: true
-if !ENV["HOMEBREW_NO_BOOTSNAP"] &&
- ENV["HOMEBREW_BOOTSNAP"] &&
- # portable ruby doesn't play nice with bootsnap
- !ENV["HOMEBREW_FORCE_VENDOR_RUBY"] &&
- (!ENV["HOMEBREW_MACOS_VERSION"] || ENV["HOMEBREW_MACOS_SYSTEM_RUBY_NEW_ENOUGH"]) &&
- ... | false |
Other | Homebrew | brew | 7e75a49b772f03f1373c6b3184a354a292693728.json | shims/mac/super: add ruby shims to set SDKROOT | .github/workflows/tests.yml | @@ -276,7 +276,7 @@ jobs:
- name: Install brew tests dependencies
run: |
brew install subversion
- Library/Homebrew/shims/scm/svn --homebrew=print-path
+ brew sh -c "svn --homebrew=print-path"
which svn
which svnadmin
| true |
Other | Homebrew | brew | 7e75a49b772f03f1373c6b3184a354a292693728.json | shims/mac/super: add ruby shims to set SDKROOT | Library/Homebrew/shims/mac/super/gem | @@ -0,0 +1 @@
+ruby
\ No newline at end of file | true |
Other | Homebrew | brew | 7e75a49b772f03f1373c6b3184a354a292693728.json | shims/mac/super: add ruby shims to set SDKROOT | Library/Homebrew/shims/mac/super/rake | @@ -0,0 +1 @@
+ruby
\ No newline at end of file | true |
Other | Homebrew | brew | 7e75a49b772f03f1373c6b3184a354a292693728.json | shims/mac/super: add ruby shims to set SDKROOT | Library/Homebrew/shims/mac/super/ruby | @@ -0,0 +1,12 @@
+#!/bin/bash
+# System Ruby's mkmf on Mojave (10.14) and later require SDKROOT set to work correctly.
+
+source "$HOMEBREW_LIBRARY/Homebrew/shims/utils.sh"
+
+try_exec_non_system "$SHIM_FILE" "$@"
+
+if [[ -z "$SDKROOT" && -n "$HOMEBREW_SDKROOT" ]]; then
+ export SDKROOT=$HOMEBREW_SDKROOT
+fi
+
+safe_... | true |
Other | Homebrew | brew | 7e75a49b772f03f1373c6b3184a354a292693728.json | shims/mac/super: add ruby shims to set SDKROOT | Library/Homebrew/shims/scm/git | @@ -3,87 +3,15 @@
# This script because we support $HOMEBREW_GIT, $HOMEBREW_SVN, etc., Xcode-only and
# no Xcode/CLT configurations. Order is careful to be what the user would want.
-set +o posix
-
-quiet_safe_cd() {
- cd "$1" >/dev/null || { echo "Error: failed to cd to $1" >&2; exit 1; }
-}
-
-absdir() {
- quie... | true |
Other | Homebrew | brew | 7e75a49b772f03f1373c6b3184a354a292693728.json | shims/mac/super: add ruby shims to set SDKROOT | Library/Homebrew/shims/utils.sh | @@ -0,0 +1,94 @@
+set +o posix
+
+quiet_safe_cd() {
+ cd "$1" >/dev/null || { echo "Error: failed to cd to $1" >&2; exit 1; }
+}
+
+absdir() {
+ quiet_safe_cd "${1%/*}/" && pwd -P
+}
+
+dirbasepath() {
+ local dir="$1"
+ local base="${2##*/}"
+ echo "$dir/$base"
+}
+
+realpath() {
+ local path="$1"
+ local dir
+... | true |
Other | Homebrew | brew | be11a22d97c1af2018789485286f4ed9c558c29f.json | Update man pages | completions/fish/brew.fish | @@ -1053,7 +1053,7 @@ __fish_brew_complete_arg 'pr-publish' -l workflow -d 'Target workflow filename (
__fish_brew_complete_cmd 'pr-pull' 'Download and publish bottles, and apply the bottle commit from a pull request with artifacts generated by GitHub Actions'
-__fish_brew_complete_arg 'pr-pull' -l archive-item -d... | true |
Other | Homebrew | brew | be11a22d97c1af2018789485286f4ed9c558c29f.json | Update man pages | completions/zsh/_brew | @@ -1229,7 +1229,7 @@ _brew_pr_publish() {
# brew pr-pull
_brew_pr_pull() {
_arguments \
- '(--bintray-org)--archive-item[Upload to the specified Archive item (default: `homebrew`)]' \
+ '(--bintray-org)--archive-item[Upload to the specified Internet Archive item (default: `homebrew`)]' \
'--artifact[Do... | true |
Other | Homebrew | brew | be11a22d97c1af2018789485286f4ed9c558c29f.json | Update man pages | docs/Manpage.md | @@ -1182,7 +1182,7 @@ Requires write access to the repository.
* `--artifact`:
Download artifacts with the specified name (default: `bottles`).
* `--archive-item`:
- Upload to the specified Archive item (default: `homebrew`).
+ Upload to the specified Internet Archive item (default: `homebrew`).
* `--bintray-or... | true |
Other | Homebrew | brew | be11a22d97c1af2018789485286f4ed9c558c29f.json | Update man pages | manpages/brew.1 | @@ -1646,7 +1646,7 @@ Download artifacts with the specified name (default: \fBbottles\fR)\.
.
.TP
\fB\-\-archive\-item\fR
-Upload to the specified Archive item (default: \fBhomebrew\fR)\.
+Upload to the specified Internet Archive item (default: \fBhomebrew\fR)\.
.
.TP
\fB\-\-bintray\-org\fR
@@ -1697,7 +1697,7 @@ ... | true |
Other | Homebrew | brew | 2b1f460289d2ef8106814e750e38a4c65dbf5cdf.json | Fix `installed_on_request` for dependencies.
Dependencies were using `Tab.for_formula(df)` to get a `Tab` which meant
that they were always ending up with the (default) value of `true` for
`installed_on_request`. Fix this by:
- setting `installed_on_request` to `false` by default in empty `Tab`s;
we always override ... | Library/Homebrew/formula_installer.rb | @@ -707,31 +707,32 @@ def fetch_dependency(dep)
sig { params(dep: Dependency, inherited_options: Options).void }
def install_dependency(dep, inherited_options)
df = dep.to_formula
- tab = Tab.for_formula(df)
if df.linked_keg.directory?
linked_keg = Keg.new(df.linked_keg.resolved_path)
+ ... | true |
Other | Homebrew | brew | 2b1f460289d2ef8106814e750e38a4c65dbf5cdf.json | Fix `installed_on_request` for dependencies.
Dependencies were using `Tab.for_formula(df)` to get a `Tab` which meant
that they were always ending up with the (default) value of `true` for
`installed_on_request`. Fix this by:
- setting `installed_on_request` to `false` by default in empty `Tab`s;
we always override ... | Library/Homebrew/tab.rb | @@ -29,7 +29,7 @@ def self.create(formula, compiler, stdlib)
"tabfile" => formula.prefix/FILENAME,
"built_as_bottle" => build.bottle?,
"installed_as_dependency" => false,
- "installed_on_request" => true,
+ "installed_on_request" => false,
"poured_from... | true |
Other | Homebrew | brew | 22fb25d96d924e98ba7ae144e0483c9db9bc2a28.json | Enable HOMEBREW_BOOTSNAP for developers
- Enable it by default if you've run a developer command or set
`HOMEBREW_DEVELOPER`.
- Clarify the documentation that there's various configuration in which
it doesn't work.
I've rolled this out of most of GitHub's developers with no ill effects
and we've enabled it in bot... | Library/Homebrew/brew.sh | @@ -584,6 +584,11 @@ then
export HOMEBREW_BOTTLE_DOMAIN="$HOMEBREW_BOTTLE_DEFAULT_DOMAIN"
fi
+if [[ -n "$HOMEBREW_DEVELOPER" || -n "$HOMEBREW_DEV_CMD_RUN" ]]
+then
+ export HOMEBREW_BOOTSNAP="1"
+fi
+
export HOMEBREW_BREW_DEFAULT_GIT_REMOTE="https://github.com/Homebrew/brew"
if [[ -z "$HOMEBREW_BREW_GIT_REMOTE... | true |
Other | Homebrew | brew | 22fb25d96d924e98ba7ae144e0483c9db9bc2a28.json | Enable HOMEBREW_BOOTSNAP for developers
- Enable it by default if you've run a developer command or set
`HOMEBREW_DEVELOPER`.
- Clarify the documentation that there's various configuration in which
it doesn't work.
I've rolled this out of most of GitHub's developers with no ill effects
and we've enabled it in bot... | Library/Homebrew/env_config.rb | @@ -40,8 +40,9 @@ module EnvConfig
description: "Use this username when accessing the Bintray API (where bottles are stored).",
},
HOMEBREW_BOOTSNAP: {
- description: "If set, use Bootsnap to speed up repeated `brew` calls. "\
- "A no-op when using ... | true |
Other | Homebrew | brew | 22fb25d96d924e98ba7ae144e0483c9db9bc2a28.json | Enable HOMEBREW_BOOTSNAP for developers
- Enable it by default if you've run a developer command or set
`HOMEBREW_DEVELOPER`.
- Clarify the documentation that there's various configuration in which
it doesn't work.
I've rolled this out of most of GitHub's developers with no ill effects
and we've enabled it in bot... | docs/Manpage.md | @@ -1721,7 +1721,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
<br>Use this username when accessing the Bintray API (where bottles are stored).
- `HOMEBREW_BOOTSNAP`
- <br>If set, use Bootsnap to speed up repeated `brew` calls. A no-op when using Homebrew's vendored, relocatable Rub... | true |
Other | Homebrew | brew | 22fb25d96d924e98ba7ae144e0483c9db9bc2a28.json | Enable HOMEBREW_BOOTSNAP for developers
- Enable it by default if you've run a developer command or set
`HOMEBREW_DEVELOPER`.
- Clarify the documentation that there's various configuration in which
it doesn't work.
I've rolled this out of most of GitHub's developers with no ill effects
and we've enabled it in bot... | manpages/brew.1 | @@ -2398,7 +2398,7 @@ Use this username when accessing the Bintray API (where bottles are stored)\.
\fBHOMEBREW_BOOTSNAP\fR
.
.br
-If set, use Bootsnap to speed up repeated \fBbrew\fR calls\. A no\-op when using Homebrew\'s vendored, relocatable Ruby on macOS (as it doesn\'t work)\.
+If set, use Bootsnap to speed up... | true |
Other | Homebrew | brew | 7fd6d2166b93d8b86710b7642c094c7164f20dd7.json | Update man pages | completions/bash/brew | @@ -1475,6 +1475,7 @@ _brew_pr_pull() {
case "$cur" in
-*)
__brewcomp "
+ --archive-item
--artifact
--autosquash
--bintray-mirror | true |
Other | Homebrew | brew | 7fd6d2166b93d8b86710b7642c094c7164f20dd7.json | Update man pages | completions/fish/brew.fish | @@ -1053,6 +1053,7 @@ __fish_brew_complete_arg 'pr-publish' -l workflow -d 'Target workflow filename (
__fish_brew_complete_cmd 'pr-pull' 'Download and publish bottles, and apply the bottle commit from a pull request with artifacts generated by GitHub Actions'
+__fish_brew_complete_arg 'pr-pull' -l archive-item -d... | true |
Other | Homebrew | brew | 7fd6d2166b93d8b86710b7642c094c7164f20dd7.json | Update man pages | completions/zsh/_brew | @@ -1229,10 +1229,11 @@ _brew_pr_publish() {
# brew pr-pull
_brew_pr_pull() {
_arguments \
+ '(--bintray-org)--archive-item[Upload to the specified Archive item (default: `homebrew`)]' \
'--artifact[Download artifacts with the specified name (default: `bottles`)]' \
'(--clean)--autosquash[Automaticall... | true |
Other | Homebrew | brew | 7fd6d2166b93d8b86710b7642c094c7164f20dd7.json | Update man pages | docs/Manpage.md | @@ -1181,6 +1181,8 @@ Requires write access to the repository.
Message to include when autosquashing revision bumps, deletions, and rebuilds.
* `--artifact`:
Download artifacts with the specified name (default: `bottles`).
+* `--archive-item`:
+ Upload to the specified Archive item (default: `homebrew`).
* `--... | true |
Other | Homebrew | brew | 7fd6d2166b93d8b86710b7642c094c7164f20dd7.json | Update man pages | manpages/brew.1 | @@ -1645,6 +1645,10 @@ Message to include when autosquashing revision bumps, deletions, and rebuilds\.
Download artifacts with the specified name (default: \fBbottles\fR)\.
.
.TP
+\fB\-\-archive\-item\fR
+Upload to the specified Archive item (default: \fBhomebrew\fR)\.
+.
+.TP
\fB\-\-bintray\-org\fR
Upload to the ... | true |
Other | Homebrew | brew | c11692ba780d7a5663aa693107d98d99a83d1050.json | pr-pull: Upload bottles to Archive.org
Add option --archive-item | Library/Homebrew/dev-cmd/pr-pull.rb | @@ -49,6 +49,8 @@ def pr_pull_args
description: "Message to include when autosquashing revision bumps, deletions, and rebuilds."
flag "--artifact=",
description: "Download artifacts with the specified name (default: `bottles`)."
+ flag "--archive-item=",
+ descrip... | false |
Other | Homebrew | brew | 2794641a28b8f914d8e28a50d505284d8a10e4f3.json | Update man pages | completions/bash/brew | @@ -1507,6 +1507,7 @@ _brew_pr_upload() {
case "$cur" in
-*)
__brewcomp "
+ --archive-item
--bintray-org
--debug
--dry-run | true |
Other | Homebrew | brew | 2794641a28b8f914d8e28a50d505284d8a10e4f3.json | Update man pages | completions/fish/brew.fish | @@ -1077,6 +1077,7 @@ __fish_brew_complete_arg 'pr-pull' -l workflows -d 'Retrieve artifacts from the
__fish_brew_complete_cmd 'pr-upload' 'Apply the bottle commit and publish bottles to Bintray or GitHub Releases'
+__fish_brew_complete_arg 'pr-upload' -l archive-item -d 'Upload to the specified Archive item (defa... | true |
Other | Homebrew | brew | 2794641a28b8f914d8e28a50d505284d8a10e4f3.json | Update man pages | completions/zsh/_brew | @@ -1255,6 +1255,7 @@ _brew_pr_pull() {
# brew pr-upload
_brew_pr_upload() {
_arguments \
+ '--archive-item[Upload to the specified Archive item (default: `homebrew`)]' \
'--bintray-org[Upload to the specified Bintray organisation (default: `homebrew`)]' \
'--debug[Display any debugging information]' ... | true |
Other | Homebrew | brew | 2794641a28b8f914d8e28a50d505284d8a10e4f3.json | Update man pages | docs/Manpage.md | @@ -1208,6 +1208,8 @@ Apply the bottle commit and publish bottles to Bintray or GitHub Releases.
Do not generate a new commit before uploading.
* `--warn-on-upload-failure`:
Warn instead of raising an error if the bottle upload fails. Useful for repairing bottle uploads that previously failed.
+* `--archive-item... | true |
Other | Homebrew | brew | 2794641a28b8f914d8e28a50d505284d8a10e4f3.json | Update man pages | manpages/brew.1 | @@ -1692,6 +1692,10 @@ Do not generate a new commit before uploading\.
Warn instead of raising an error if the bottle upload fails\. Useful for repairing bottle uploads that previously failed\.
.
.TP
+\fB\-\-archive\-item\fR
+Upload to the specified Archive item (default: \fBhomebrew\fR)\.
+.
+.TP
\fB\-\-bintray\-o... | true |
Other | Homebrew | brew | b0bd15fb41b711782e04d24b307dc515ef65aaa2.json | pr-upload: Upload bottles to Archive.org
--archive-item specifies the item identifier.
HOMEBREW_ARCHIVE_KEY=access:secret specifies the S3 key. | Library/Homebrew/archive.rb | @@ -0,0 +1,185 @@
+# typed: false
+# frozen_string_literal: true
+
+require "digest/md5"
+require "utils/curl"
+
+# Archive API client.
+#
+# @api private
+class Archive
+ extend T::Sig
+
+ include Context
+ include Utils::Curl
+
+ class Error < RuntimeError
+ end
+
+ sig { returns(String) }
+ def inspect
+ "... | true |
Other | Homebrew | brew | b0bd15fb41b711782e04d24b307dc515ef65aaa2.json | pr-upload: Upload bottles to Archive.org
--archive-item specifies the item identifier.
HOMEBREW_ARCHIVE_KEY=access:secret specifies the S3 key. | Library/Homebrew/dev-cmd/pr-upload.rb | @@ -2,6 +2,7 @@
# frozen_string_literal: true
require "cli/parser"
+require "archive"
require "bintray"
module Homebrew
@@ -27,6 +28,8 @@ def pr_upload_args
switch "--warn-on-upload-failure",
description: "Warn instead of raising an error if the bottle upload fails. "\
... | true |
Other | Homebrew | brew | b0bd15fb41b711782e04d24b307dc515ef65aaa2.json | pr-upload: Upload bottles to Archive.org
--archive-item specifies the item identifier.
HOMEBREW_ARCHIVE_KEY=access:secret specifies the S3 key. | Library/Homebrew/env_config.rb | @@ -15,6 +15,10 @@ module EnvConfig
description: "Linux only: Pass this value to a type name representing the compiler's `-march` option.",
default: "native",
},
+ HOMEBREW_ARCHIVE_KEY: {
+ description: "Use this API key when accessing the Archive.org API (wher... | true |
Other | Homebrew | brew | 85eb346fb756fc8177f95024f6ad357f45820815.json | download_strategy: fix nounzip strategy ignoring block | Library/Homebrew/download_strategy.rb | @@ -586,6 +586,7 @@ def stage
UnpackStrategy::Uncompressed.new(cached_location)
.extract(basename: basename,
verbose: verbose? && !quiet?)
+ yield if block_given?
end
end
| false |
Other | Homebrew | brew | 3edf569f7edddff504b4f106c5f5d905c14fe846.json | style: require parentheses around regex arguments | Library/.rubocop.yml | @@ -261,14 +261,6 @@ Naming/MemoizedInstanceVariableName:
Exclude:
- "Homebrew/lazy_object.rb"
-# so many of these in formulae and can't be autocorrected
-# TODO: fix these as `ruby -w` complains about them.
-Lint/AmbiguousRegexpLiteral:
- Exclude:
- - "Taps/*/*/*.rb"
- - "/**/Formula/*.rb"
- - "**/... | false |
Other | Homebrew | brew | 83255527f3852bda723e658c4eb77cdebec50b70.json | Add workflow to automate manpage updates | .github/workflows/update-manpage.yml | @@ -0,0 +1,75 @@
+name: Update manpage and completions
+
+on:
+ push:
+ paths:
+ - .github/workflows/update-manpage.yml
+ - README.md
+ - Library/Homebrew/cmd/**
+ - Library/Homebrew/dev-cmd/**
+ - Library/Homebrew/completions/**
+ - Library/Homebrew/manpages/**
+ - Library/Homebr... | false |
Other | Homebrew | brew | 81e3aa899d6146d4e0a36246513e3a72469334bc.json | update-report: use appropriate pronoun in update message | Library/Homebrew/cmd/update-report.rb | @@ -140,6 +140,11 @@ def update_report
unless args.preinstall?
outdated_formulae = Formula.installed.count(&:outdated?)
outdated_casks = Cask::Caskroom.casks.count(&:outdated?)
+ update_pronoun = if (outdated_formulae + outdated_casks) == 1
+ "it"
+ else
+ ... | false |
Other | Homebrew | brew | f09c42809934e8e4e21b65fccfe8dd2ca72ac68c.json | workflows/tests: move more macOS tests to Linux.
`brew style` is OS independent so let's run all the `brew style` tests
on Linux rather than macOS. | .github/workflows/tests.yml | @@ -81,6 +81,53 @@ jobs:
- name: Run brew audit --skip-style on all taps
run: brew audit --skip-style
+ - name: Set up all Homebrew taps
+ run: |
+ HOMEBREW_REPOSITORY="$(brew --repo)"
+ HOMEBREW_CORE_REPOSITORY="$HOMEBREW_REPOSITORY/Library/Taps/homebrew/homebrew-core"
+... | false |
Other | Homebrew | brew | 0fe758dcb2b079d974a3bcfa59898abca76b5cc8.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 | @@ -7960,17 +7960,17 @@ end
module GetText
end
-class GitHub::Actions::Annotation
+module GitHub::API
extend ::T::Private::Methods::MethodHooks
extend ::T::Private::Methods::SingletonMethodHooks
end
-module GitHub::Actions
+class GitHub::Actions::Annotation
extend ::T::Private::Methods::MethodHooks
e... | false |
Other | Homebrew | brew | 90e9d177894f76b5f5081d3be2a92245b2aafeda.json | formulary: remove consts if loading failed | Library/Homebrew/formulary.rb | @@ -60,6 +60,7 @@ def self.load_formula(name, path, contents, namespace, flags:)
mod.const_set(:BUILD_FLAGS, flags)
mod.module_eval(contents, path)
rescue NameError, ArgumentError, ScriptError, MethodDeprecatedError => e
+ remove_const(namespace)
raise FormulaUnreadableError.new(name, e)
... | false |
Other | Homebrew | brew | 6d948bf6ab26b0f1d074e5cedb1c401b1af9f483.json | utils/github: add wrapper for GitHub API method | Library/Homebrew/utils/github.rb | @@ -13,6 +13,12 @@ module GitHub
module_function
+ def open_api(url, data: nil, data_binary_path: nil, request_method: nil, scopes: [].freeze, parse_json: true)
+ odeprecated "GitHub.open_api", "GitHub::API.open_api"
+ API.open_api(url, data: data, data_binary_path: data_binary_path, request_method: reque... | false |
Other | Homebrew | brew | da9e42f3125d191ef73eabc0db03868229904231.json | formulary: remove consts on cache clear | Library/Homebrew/formulary.rb | @@ -33,6 +33,19 @@ def self.formula_class_get(path)
cache.fetch(path)
end
+ def self.clear_cache
+ cache.each do |key, klass|
+ next if key == :formulary_factory
+
+ namespace = klass.name.deconstantize
+ next if namespace.deconstantize != name
+
+ remove_const(namespace.demodulize)
+ ... | false |
Other | Homebrew | brew | 22e591e5318ff498c9c18881ec429ad1260c7a93.json | Make HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK default
- Remove `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK` and make the behaviour
the default. We mostly already do this since we added the need for
the `--build-from-source` override on macOS. This allows us to
delete some more code.
- Still fail and require `--build-from-sour... | Library/Homebrew/env_config.rb | @@ -212,11 +212,6 @@ module EnvConfig
description: "If set, do not use Bootsnap to speed up repeated `brew` calls.",
boolean: true,
},
- HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: {
- description: "If set, fail on the failure of installation from a bottle rather than " \
- ... | true |
Other | Homebrew | brew | 22e591e5318ff498c9c18881ec429ad1260c7a93.json | Make HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK default
- Remove `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK` and make the behaviour
the default. We mostly already do this since we added the need for
the `--build-from-source` override on macOS. This allows us to
delete some more code.
- Still fail and require `--build-from-sour... | Library/Homebrew/formula_installer.rb | @@ -94,7 +94,6 @@ def initialize(
@options = options
@requirement_messages = []
@poured_bottle = false
- @pour_failed = false
@start_time = nil
end
@@ -154,8 +153,6 @@ def build_bottle?
sig { params(output_warning: T::Boolean).returns(T::Boolean) }
def pour_bottle?(output_warning: fa... | true |
Other | Homebrew | brew | 22e591e5318ff498c9c18881ec429ad1260c7a93.json | Make HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK default
- Remove `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK` and make the behaviour
the default. We mostly already do this since we added the need for
the `--build-from-source` override on macOS. This allows us to
delete some more code.
- Still fail and require `--build-from-sour... | docs/Manpage.md | @@ -1852,9 +1852,6 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
- `HOMEBREW_NO_BOOTSNAP`
<br>If set, do not use Bootsnap to speed up repeated `brew` calls.
-- `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK`
- <br>If set, fail on the failure of installation from a bottle rather than falling back... | true |
Other | Homebrew | brew | 22e591e5318ff498c9c18881ec429ad1260c7a93.json | Make HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK default
- Remove `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK` and make the behaviour
the default. We mostly already do this since we added the need for
the `--build-from-source` override on macOS. This allows us to
delete some more code.
- Still fail and require `--build-from-sour... | manpages/brew.1 | @@ -2641,12 +2641,6 @@ If set, do not automatically update before running some commands e\.g\. \fBbrew
If set, do not use Bootsnap to speed up repeated \fBbrew\fR calls\.
.
.TP
-\fBHOMEBREW_NO_BOTTLE_SOURCE_FALLBACK\fR
-.
-.br
-If set, fail on the failure of installation from a bottle rather than falling back to bui... | true |
Other | Homebrew | brew | bac714a6005c6b9ad577599e20dfec26ec6d48ec.json | Add hyperlinks for election methods | docs/Homebrew-Governance.md | @@ -54,7 +54,7 @@
1. The governance and operation of Homebrew is determined by the PLC. The PLC will represent Homebrew in all dealings with the Software Freedom Conservancy (SFC). The PLC has final authority in all matters related to the operation of Homebrew, and will comply with all Software Freedom Conservancy p... | false |
Other | Homebrew | brew | bf60e2da3ddc49de569fd01726e0ad8a5f794fdb.json | utils/repology: add constants for repository names | Library/Homebrew/dev-cmd/bump.rb | @@ -62,24 +62,30 @@ def bump
next
end
- "homebrew"
+ Repology::HOMEBREW_CORE
else
- "homebrew_casks"
+ Repology::HOMEBREW_CASK
end
package_data = Repology.single_package_query(name, repository: repository)
retrieve_and_d... | true |
Other | Homebrew | brew | bf60e2da3ddc49de569fd01726e0ad8a5f794fdb.json | utils/repology: add constants for repository names | Library/Homebrew/utils/repology.rb | @@ -7,6 +7,9 @@
#
# @api private
module Repology
+ HOMEBREW_CORE = "homebrew"
+ HOMEBREW_CASK = "homebrew_casks"
+
module_function
MAX_PAGINATION = 15
@@ -36,9 +39,9 @@ def single_package_query(name, repository:)
def parse_api_response(limit = nil, repository:)
package_term = case repository
- ... | true |
Other | Homebrew | brew | 24bb6040a7436d11f9eb8421ee928f3dc7a3c94d.json | dev-cmd/bump: add cask support | Library/Homebrew/dev-cmd/bump.rb | @@ -16,66 +16,107 @@ def bump_args
Display out-of-date brew formulae and the latest version available.
Also displays whether a pull request has been opened with the URL.
EOS
+ switch "--no-pull-requests",
+ description: "Do not retrieve pull requests from GitHub."
+ switch... | true |
Other | Homebrew | brew | 24bb6040a7436d11f9eb8421ee928f3dc7a3c94d.json | dev-cmd/bump: add cask support | Library/Homebrew/test/utils/repology_spec.rb | @@ -6,13 +6,13 @@
describe Repology do
describe "single_package_query", :needs_network do
it "returns nil for non-existent package" do
- response = described_class.single_package_query("invalidName")
+ response = described_class.single_package_query("invalidName", repository: "homebrew")
exp... | true |
Other | Homebrew | brew | 24bb6040a7436d11f9eb8421ee928f3dc7a3c94d.json | dev-cmd/bump: add cask support | Library/Homebrew/utils/repology.rb | @@ -12,16 +12,16 @@ module Repology
MAX_PAGINATION = 15
private_constant :MAX_PAGINATION
- def query_api(last_package_in_response = "")
+ def query_api(last_package_in_response = "", repository:)
last_package_in_response += "/" if last_package_in_response.present?
- url = "https://repology.org/api/v1/... | true |
Other | Homebrew | brew | 24bb6040a7436d11f9eb8421ee928f3dc7a3c94d.json | dev-cmd/bump: add cask support | completions/bash/brew | @@ -427,16 +427,20 @@ _brew_bump() {
case "$cur" in
-*)
__brewcomp "
+ --cask
--debug
+ --formula
--help
--limit
+ --no-pull-requests
--quiet
--verbose
"
return
;;
esac
__brew_complete_formulae
+ __brew_complete_casks
}
_br... | true |
Other | Homebrew | brew | 24bb6040a7436d11f9eb8421ee928f3dc7a3c94d.json | dev-cmd/bump: add cask support | completions/fish/brew.fish | @@ -387,12 +387,16 @@ __fish_brew_complete_arg 'bottle' -a '(__fish_brew_suggest_formulae_installed)'
__fish_brew_complete_cmd 'bump' 'Display out-of-date brew formulae and the latest version available'
+__fish_brew_complete_arg 'bump' -l cask -d 'Check only casks'
__fish_brew_complete_arg 'bump' -l debug -d 'Dis... | true |
Other | Homebrew | brew | 24bb6040a7436d11f9eb8421ee928f3dc7a3c94d.json | dev-cmd/bump: add cask support | completions/zsh/_brew | @@ -469,12 +469,16 @@ _brew_bottle() {
# brew bump
_brew_bump() {
_arguments \
+ '(--formula)--cask[Check only casks]' \
'--debug[Display any debugging information]' \
+ '(--cask)--formula[Check only formulae]' \
'--help[Show this message]' \
'--limit[Limit number of package results returned]'... | true |
Other | Homebrew | brew | 24bb6040a7436d11f9eb8421ee928f3dc7a3c94d.json | dev-cmd/bump: add cask support | docs/Manpage.md | @@ -826,11 +826,17 @@ value, while `--no-rebuild` will remove it.
* `--root-url`:
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.
-### `bump` [*`--limit`*`=`] [*`formula`* ...]
+### `bump` [*`options`*] [*`formula`*|*`cask`* ...]
Display out-of-date brew formulae and th... | true |
Other | Homebrew | brew | 24bb6040a7436d11f9eb8421ee928f3dc7a3c94d.json | dev-cmd/bump: add cask support | manpages/brew.1 | @@ -1132,10 +1132,22 @@ When passed with \fB\-\-write\fR, a new commit will not generated after writing
\fB\-\-root\-url\fR
Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\.
.
-.SS "\fBbump\fR [\fI\-\-limit\fR\fB=\fR] [\fIformula\fR \.\.\.]"
+.SS "\fBbump\fR [\fIoptions\fR... | true |
Other | Homebrew | brew | 287b4888e61d956bddf2a6adda9ecb302046f83d.json | Update RBI files for rubocop. | Library/Homebrew/sorbet/rbi/gems/rubocop@1.10.0.rbi | @@ -1451,6 +1451,16 @@ RuboCop::Cop::FrozenStringLiteral::FROZEN_STRING_LITERAL_TYPES = T.let(T.unsafe(
module RuboCop::Cop::Gemspec
end
+class RuboCop::Cop::Gemspec::DateAssignment < ::RuboCop::Cop::Base
+ include(::RuboCop::Cop::RangeHelp)
+ extend(::RuboCop::Cop::AutoCorrector)
+
+ def gem_specification(param... | false |
Other | Homebrew | brew | 1ae832d9a9d5d0b0fe5b1160b524287c81b9c602.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/pry@0.13.1.rbi | @@ -1,7 +0,0 @@
-# DO NOT EDIT MANUALLY
-# This is an autogenerated file for types exported from the `pry` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
-
-# typed: true
-
- | true |
Other | Homebrew | brew | 1ae832d9a9d5d0b0fe5b1160b524287c81b9c602.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/pry@0.14.0.rbi | @@ -0,0 +1,8 @@
+# DO NOT EDIT MANUALLY
+# This is an autogenerated file for types exported from the `pry` gem.
+# Please instead update this file by running `tapioca sync`.
+
+# typed: true
+
+# THIS IS AN EMPTY RBI FILE.
+# see https://github.com/Shopify/tapioca/blob/master/README.md#manual-gem-requires | true |
Other | Homebrew | brew | 1ae832d9a9d5d0b0fe5b1160b524287c81b9c602.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/spoom@1.0.9.rbi | @@ -5,6 +5,10 @@
# typed: true
module Spoom
+ class << self
+ sig { params(cmd: String, arg: String, path: String, capture_err: T::Boolean).returns([String, T::Boolean]) }
+ def exec(cmd, *arg, path: T.unsafe(nil), capture_err: T.unsafe(nil)); end
+ end
end
module Spoom::Cli
@@ -15,7 +19,10 @@ class Spo... | true |
Other | Homebrew | brew | 1ae832d9a9d5d0b0fe5b1160b524287c81b9c602.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/tapioca@0.4.14.rbi | @@ -362,23 +362,27 @@ class Tapioca::Gemfile
sig { void }
def initialize; end
+ sig { returns(Bundler::Definition) }
+ def definition; end
sig { returns(T::Array[Tapioca::Gemfile::Gem]) }
def dependencies; end
sig { params(gem_name: String).returns(T.nilable(Tapioca::Gemfile::Gem)) }
def gem(gem_n... | true |
Other | Homebrew | brew | 1ae832d9a9d5d0b0fe5b1160b524287c81b9c602.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/gems/thor@1.1.0.rbi | @@ -1,6 +1,6 @@
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `thor` gem.
-# Please instead update this file by running `tapioca generate --exclude json`.
+# Please instead update this file by running `tapioca sync`.
# typed: true
@@ -77,7 +77,7 @@ module Thor::Actions
def... | true |
Other | Homebrew | brew | 1ae832d9a9d5d0b0fe5b1160b524287c81b9c602.json | Update RBI files for tapioca. | Library/Homebrew/sorbet/rbi/hidden-definitions/hidden.rbi | @@ -14099,8 +14099,6 @@ class Pry::CLI
def self.add_options(&block); end
- def self.add_plugin_options(); end
-
def self.input_args(); end
def self.input_args=(input_args); end
@@ -15386,10 +15384,6 @@ class Pry::Config
def should_load_local_rc=(should_load_local_rc); end
- def should_load_plugi... | true |
Other | Homebrew | brew | 79e93f54e2b818476df4ca4c5785d2c87779f035.json | Ignore more parser warnings | Library/Homebrew/style.rb | @@ -78,7 +78,13 @@ def run_rubocop(files, output_type,
fix: false, except_cops: nil, only_cops: nil, display_cop_names: false, reset_cache: false,
debug: false, verbose: false)
Homebrew.install_bundler_gems!
- require "rubocop"
+
+ require "warnings"
+
+ W... | true |
Other | Homebrew | brew | 79e93f54e2b818476df4ca4c5785d2c87779f035.json | Ignore more parser warnings | Library/Homebrew/test/spec_helper.rb | @@ -23,12 +23,17 @@
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(formatters)
end
+require_relative "../warnings"
+
+Warnings.ignore :parser_syntax do
+ require "rubocop"
+end
+
require "rspec/its"
require "rspec/github"
require "rspec/wait"
require "rspec/retry"
require "rspec/sorbet"
-re... | true |
Other | Homebrew | brew | 79e93f54e2b818476df4ca4c5785d2c87779f035.json | Ignore more parser warnings | Library/Homebrew/utils/rubocop.rb | @@ -2,18 +2,10 @@
# typed: false
# frozen_string_literal: true
-require "warning"
+require_relative "../warnings"
-warnings = [
- %r{warning: parser/current is loading parser/ruby\d+, which recognizes},
- /warning: \d+\.\d+\.\d+-compliant syntax, but you are running \d+\.\d+\.\d+\./,
- %r{warning: please see h... | true |
Other | Homebrew | brew | 79e93f54e2b818476df4ca4c5785d2c87779f035.json | Ignore more parser warnings | Library/Homebrew/warnings.rb | @@ -0,0 +1,36 @@
+# typed: true
+# frozen_string_literal: true
+
+require "warning"
+
+# Helper module for handling warnings.
+#
+# @api private
+module Warnings
+ module_function
+
+ COMMON_WARNINGS = {
+ parser_syntax: [
+ %r{warning: parser/current is loading parser/ruby\d+, which recognizes},
+ /warn... | true |
Other | Homebrew | brew | 79e93f54e2b818476df4ca4c5785d2c87779f035.json | Ignore more parser warnings | Library/Homebrew/warnings.rbi | @@ -0,0 +1,5 @@
+# typed: strict
+
+module Warnings
+ include Kernel
+end | true |
Other | Homebrew | brew | 1cc983f00d552da17336405460e3adc001c95ba5.json | download_strategy: pass chdir block to stage | Library/Homebrew/download_strategy.rb | @@ -71,25 +71,29 @@ def quiet?
# Unlike {Resource#stage}, this does not take a block.
#
# @api public
- def stage
+ def stage(&block)
UnpackStrategy.detect(cached_location,
prioritise_extension: true,
ref_type: @ref_type, ref: @ref)
... | true |
Other | Homebrew | brew | 1cc983f00d552da17336405460e3adc001c95ba5.json | download_strategy: pass chdir block to stage | Library/Homebrew/resource.rb | @@ -114,14 +114,15 @@ def apply_patches
# A target or a block must be given, but not both.
def unpack(target = nil)
mktemp(download_name) do |staging|
- downloader.stage
- @source_modified_time = downloader.source_modified_time
- apply_patches
- if block_given?
- yield ResourceStag... | true |
Other | Homebrew | brew | 3cb3b34c09578387fd15200d6b919a9ccd03f02b.json | Apply suggestions from code review
Co-authored-by: Megan O'Neill <oneill38@github.com> | .github/ISSUE_TEMPLATE/bug.yml | @@ -2,7 +2,7 @@ name: New issue for Reproducible Bug
about: "If you're sure it's reproducible and not just your machine: submit an issue so we can investigate."
labels: bug
issue_body: false
-inputs:
+body:
- type: markdown
attributes:
value: Please note we will close your issue without comment if you... | true |
Other | Homebrew | brew | 3cb3b34c09578387fd15200d6b919a9ccd03f02b.json | Apply suggestions from code review
Co-authored-by: Megan O'Neill <oneill38@github.com> | .github/ISSUE_TEMPLATE/feature.yml | @@ -2,7 +2,7 @@ name: New issue for Feature Suggestion
about: Request our thoughts on your suggestion for a new feature for Homebrew.
labels: features
issue_body: false
-inputs:
+body:
- type: markdown
attributes:
value: Please note we will close your issue without comment if you do not fill out the i... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/.rubocop.yml | @@ -7,10 +7,6 @@ Layout/MultilineMethodCallIndentation:
Exclude:
- "**/*_spec.rb"
-# TODO: add parentheses for these and remove
-Lint/AssignmentInCondition:
- Enabled: false
-
# `formula do` uses nested method definitions
Lint/NestedMethodDefinition:
Exclude: | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/cask/audit.rb | @@ -696,7 +696,7 @@ def get_repo_data(regex)
def check_denylist
return unless cask.tap
return unless cask.tap.official?
- return unless reason = Denylist.reason(cask.token)
+ return unless (reason = Denylist.reason(cask.token))
add_error "#{cask.token} is not allowed: #{reason}"
... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/cask/caskroom.rb | @@ -39,9 +39,9 @@ def self.casks(config: nil)
Pathname.glob(path.join("*")).sort.select(&:directory?).map do |path|
token = path.basename.to_s
- if tap_path = CaskLoader.tap_paths(token).first
+ if (tap_path = CaskLoader.tap_paths(token).first)
CaskLoader::FromTapPathLoader.ne... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/cask/installer.rb | @@ -191,7 +191,7 @@ def extract_primary_container(to: @cask.staged_path)
basename = downloader.basename
- if nested_container = @cask.container&.nested
+ if (nested_container = @cask.container&.nested)
Dir.mktmpdir do |tmpdir|
tmpdir = Pathname(tmpdir)
primary_contain... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/cleanup.rb | @@ -80,7 +80,7 @@ def stale_formula?(scrub)
version = Version.new(version)
- return false unless formula_name = basename.to_s[/\A(.*?)(?:--.*?)*--?(?:#{Regexp.escape(version)})/, 1]
+ return false unless (formula_name = basename.to_s[/\A(.*?)(?:--.*?)*--?(?:#{Regexp.escape(version)})/, ... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/cli/parser.rb | @@ -623,7 +623,7 @@ def process_option(*args, type:)
end
def split_non_options(argv)
- if sep = argv.index("--")
+ if (sep = argv.index("--"))
[argv.take(sep), argv.drop(sep + 1)]
else
[argv, []] | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/cmd/info.rb | @@ -227,7 +227,7 @@ def github_info(f)
def info_formula(f, args:)
specs = []
- if stable = f.stable
+ if (stable = f.stable)
s = "stable #{stable.version}"
s += " (bottled)" if stable.bottled? && f.pour_bottle?
specs << s | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/cmd/install.rb | @@ -264,7 +264,7 @@ def install
end
end
opoo msg if msg
- elsif !f.any_version_installed? && old_formula = f.old_installed_formulae.first
+ elsif !f.any_version_installed? && (old_formula = f.old_installed_formulae.first)
msg = "#{old_formula.full_name} #{old_formula.any_... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/cmd/search.rb | @@ -73,7 +73,7 @@ def search_args
def search
args = search_args.parse
- if package_manager = PACKAGE_MANAGERS.find { |name,| args[:"#{name}?"] }
+ if (package_manager = PACKAGE_MANAGERS.find { |name,| args[:"#{name}?"] })
_, url = package_manager
exec_browser url.call(URI.encode_www_form_c... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/commands.rb | @@ -175,7 +175,7 @@ def command_options(command)
path = self.path(command)
return if path.blank?
- if cmd_parser = Homebrew::CLI::Parser.from_cmd_path(path)
+ if (cmd_parser = Homebrew::CLI::Parser.from_cmd_path(path))
cmd_parser.processed_options.map do |short, long, _, desc|
[long ||... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/completions.rb | @@ -167,7 +167,7 @@ def generate_bash_subcommand_completion(command)
return unless command_gets_completions? command
named_completion_string = ""
- if types = Commands.named_args_type(command)
+ if (types = Commands.named_args_type(command))
named_args_strings, named_args_types = type... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/context.rb | @@ -16,7 +16,7 @@ def self.current=(context)
end
def self.current
- if current_context = Thread.current[:context]
+ if (current_context = Thread.current[:context])
return current_context
end
| true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/dev-cmd/bottle.rb | @@ -254,7 +254,7 @@ def sudo_purge
def bottle_formula(f, args:)
return ofail "Formula not installed or up-to-date: #{f.full_name}" unless f.latest_version_installed?
- unless tap = f.tap
+ unless (tap = f.tap)
return ofail "Formula not from core or any installed taps: #{f.full_name}" unless args.... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/dev-cmd/create.rb | @@ -179,7 +179,7 @@ def create_formula(args:)
# Check for disallowed formula, or names that shadow aliases,
# unless --force is specified.
unless args.force?
- if reason = MissingFormula.disallowed_reason(fc.name)
+ if (reason = MissingFormula.disallowed_reason(fc.name))
odie <<~EOS
... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/dev-cmd/man.rb | @@ -164,7 +164,7 @@ def generate_cmd_manpages(cmd_paths)
# preserve existing manpage order
cmd_paths.sort_by(&method(:sort_key_for_path))
.each do |cmd_path|
- cmd_man_page_lines = if cmd_parser = CLI::Parser.from_cmd_path(cmd_path)
+ cmd_man_page_lines = if (cmd_parser = CLI::Parser.f... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/dev-cmd/unpack.rb | @@ -38,7 +38,7 @@ def unpack
formulae = args.named.to_formulae
- if dir = args.destdir
+ if (dir = args.destdir)
unpack_dir = Pathname.new(dir).expand_path
unpack_dir.mkpath
else | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/dev-cmd/update-test.rb | @@ -54,9 +54,9 @@ def update_test
start_commit, end_commit = nil
cd HOMEBREW_REPOSITORY do
- start_commit = if commit = args.commit
+ start_commit = if (commit = args.commit)
commit
- elsif date = args.before
+ elsif (date = args.before)
Utils.popen_read("git", "rev-lis... | true |
Other | Homebrew | brew | 8e5451df2fe2bafcfbfafa10646b8ebab10fef5a.json | style: use parentheses for assignment in conditions | Library/Homebrew/development_tools.rb | @@ -43,7 +43,7 @@ def default_compiler
def clang_version
@clang_version ||= begin
if (path = locate("clang")) &&
- build_version = `#{path} --version`[/(?:clang|LLVM) version (\d+\.\d)/, 1]
+ (build_version = `#{path} --version`[/(?:clang|LLVM) version (\d+\.\d)/, 1])
... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.