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 | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/fetch.rb | @@ -39,23 +39,22 @@ def fetch_args
switch :debug
conflicts "--devel", "--HEAD"
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
+ min_named :formula
end
end
def fetch
fetch_args.parse
- raise FormulaUnspecifiedError if ARGV.named.empty?
-
if args.... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/gist-logs.rb | @@ -142,10 +142,10 @@ def create_issue(repo, title, body)
def gist_logs
gist_logs_args.parse
- raise FormulaUnspecifiedError if Homebrew.args.resolved_formulae.length != 1
+ raise FormulaUnspecifiedError if args.resolved_formulae.length != 1
Install.perform_preinstall_checks(all_fatal: true)
... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/home.rb | @@ -20,10 +20,10 @@ def home_args
def home
home_args.parse
- if args.remaining.empty?
+ if args.no_named?
exec_browser HOMEBREW_WWW
else
- exec_browser(*Homebrew.args.formulae.map(&:homepage))
+ exec_browser(*args.formulae.map(&:homepage))
end
end
end | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/info.rb | @@ -67,7 +67,7 @@ def info
end
if args.category.present?
- if Homebrew.args.named.present? && !VALID_FORMULA_CATEGORIES.include?(args.category)
+ if args.named.present? && !VALID_FORMULA_CATEGORIES.include?(args.category)
raise UsageError, "--category must be one of #{VALID_FORMULA_CATEGO... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/install.rb | @@ -88,22 +88,21 @@ def install_args
conflicts "--devel", "--HEAD"
conflicts "--build-from-source", "--build-bottle", "--force-bottle"
formula_options
+ min_named :formula
end
end
def install
install_args.parse
- Homebrew.args.named.each do |name|
+ args.named.each do... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/link.rb | @@ -25,20 +25,19 @@ def link_args
description: "Allow keg-only formulae to be linked."
switch :verbose
switch :debug
+ min_named :keg
end
end
def link
link_args.parse
- raise KegUnspecifiedError if ARGV.named.empty?
-
mode = OpenStruct.new
mode.overwri... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/list.rb | @@ -55,27 +55,27 @@ def list
# Unbrewed uses the PREFIX, which will exist
# Things below use the CELLAR, which doesn't until the first formula is installed.
unless HOMEBREW_CELLAR.exist?
- raise NoSuchKegError, Hombrew.args.named.first if Homebrew.args.named.present?
+ raise NoSuchKegError, Hom... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/log.rb | @@ -33,10 +33,10 @@ def log
# user path, too.
ENV["PATH"] = ENV["HOMEBREW_PATH"]
- if ARGV.named.empty?
+ if args.no_named?
git_log HOMEBREW_REPOSITORY
else
- path = Formulary.path(ARGV.named.first)
+ path = Formulary.path(args.named.first)
tap = Tap.from_path(path)
... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/migrate.rb | @@ -19,15 +19,14 @@ def migrate_args
"the same taps and migrate them anyway."
switch :verbose
switch :debug
+ min_named :formula
end
end
def migrate
migrate_args.parse
- raise FormulaUnspecifiedError if Homebrew.args.named.blank?
-
- Homebrew.args.... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/missing.rb | @@ -30,10 +30,10 @@ def missing
return unless HOMEBREW_CELLAR.exist?
- ff = if Homebrew.args.named.blank?
+ ff = if args.no_named?
Formula.installed.sort
else
- Homebrew.args.resolved_formulae.sort
+ args.resolved_formulae.sort
end
ff.each do |f| | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/options.rb | @@ -32,10 +32,10 @@ def options
puts_options Formula.to_a.sort
elsif args.installed?
puts_options Formula.installed.sort
+ elsif args.no_named?
+ raise FormulaUnspecifiedError
else
- raise FormulaUnspecifiedError if args.remaining.empty?
-
- puts_options Homebrew.args.formulae
... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/outdated.rb | @@ -35,19 +35,19 @@ def outdated_args
def outdated
outdated_args.parse
- formulae = if Homebrew.args.resolved_formulae.blank?
+ formulae = if args.resolved_formulae.blank?
Formula.installed
else
- Homebrew.args.resolved_formulae
+ args.resolved_formulae
end
if args.json
-... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/pin.rb | @@ -15,15 +15,14 @@ def pin_args
issuing the `brew upgrade` <formula> command. See also `unpin`.
EOS
switch :debug
+ min_named :formula
end
end
def pin
pin_args.parse
- raise FormulaUnspecifiedError if args.remaining.empty?
-
- Homebrew.args.resolved_formulae.each d... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/postinstall.rb | @@ -17,15 +17,14 @@ def postinstall_args
switch :force
switch :verbose
switch :debug
+ min_named :keg
end
end
def postinstall
postinstall_args.parse
- raise KegUnspecifiedError if args.remaining.empty?
-
- Homebrew.args.resolved_formulae.each do |f|
+ args.resolved... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/readall.rb | @@ -36,10 +36,10 @@ def readall
end
options = { aliases: args.aliases? }
- taps = if ARGV.named.empty?
+ taps = if args.no_named?
Tap
else
- ARGV.named.map { |t| Tap.fetch(t) }
+ args.named.map { |t| Tap.fetch(t) }
end
taps.each do |tap|
Homebrew.failed = true un... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/reinstall.rb | @@ -45,19 +45,18 @@ def reinstall_args
description: "Print install times for each formula at the end of the run."
conflicts "--build-from-source", "--force-bottle"
formula_options
+ min_named :formula
end
end
def reinstall
reinstall_args.parse
- raise FormulaUnspe... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/search.rb | @@ -62,13 +62,13 @@ def search
if package_manager = PACKAGE_MANAGERS.find { |name,| args[:"#{name}?"] }
_, url = package_manager
- exec_browser url.call(URI.encode_www_form_component(args.remaining.join(" ")))
+ exec_browser url.call(URI.encode_www_form_component(args.named.join(" ")))
re... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/style.rb | @@ -38,14 +38,14 @@ def style_args
def style
style_args.parse
- target = if Homebrew.args.named.blank?
+ target = if args.no_named?
nil
- elsif Homebrew.args.named.any? { |file| File.exist? file }
- Homebrew.args.named
- elsif Homebrew.args.named.any? { |tap| tap.count("/") == 1 }
- ... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/switch.rb | @@ -16,16 +16,14 @@ def switch_args
EOS
switch :verbose
switch :debug
- max_named 2
+ named 2
end
end
def switch
switch_args.parse
- raise FormulaUnspecifiedError if args.remaining.empty?
-
- name = args.remaining.first
+ name = args.named.first
rack = Fo... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/tap-info.rb | @@ -30,13 +30,13 @@ def tap_info
if args.installed?
taps = Tap
else
- taps = Homebrew.args.named.sort.map do |name|
+ taps = args.named.sort.map do |name|
Tap.fetch(name)
end
end
if args.json
- raise UsageError, "Invalid JSON version: #{args.json}" unless ["v1... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/tap.rb | @@ -48,14 +48,14 @@ def tap
Tap.each(&:link_completions_and_manpages)
elsif args.list_pinned?
puts Tap.select(&:pinned?).map(&:name)
- elsif ARGV.named.empty?
+ elsif args.no_named?
puts Tap.names
else
- tap = Tap.fetch(ARGV.named.first)
+ tap = Tap.fetch(args.named.first)... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/uninstall.rb | @@ -22,23 +22,22 @@ def uninstall_args
description: "Don't fail uninstall, even if <formula> is a dependency of any installed "\
"formulae."
switch :debug
+ min_named :formula
end
end
def uninstall
uninstall_args.parse
- raise KegUnspecifiedErr... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/unlink.rb | @@ -20,18 +20,17 @@ def unlink_args
"deleting any files."
switch :verbose
switch :debug
+ min_named :keg
end
end
def unlink
unlink_args.parse
- raise KegUnspecifiedError if args.remaining.empty?
-
mode = OpenStruct.new
mode.dry_run = true if... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/unpack.rb | @@ -32,7 +32,7 @@ def unpack_args
def unpack
unpack_args.parse
- formulae = Homebrew.args.formulae
+ formulae = args.formulae
raise FormulaUnspecifiedError if formulae.empty?
if dir = args.destdir | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/unpin.rb | @@ -22,9 +22,9 @@ def unpin_args
def unpin
unpin_args.parse
- raise FormulaUnspecifiedError if args.remaining.empty?
+ raise FormulaUnspecifiedError if args.no_named?
- Homebrew.args.resolved_formulae.each do |f|
+ args.resolved_formulae.each do |f|
if f.pinned?
f.unpin
el... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/untap.rb | @@ -13,15 +13,14 @@ def untap_args
Remove a tapped formula repository.
EOS
switch :debug
+ min_named 1
end
end
def untap
untap_args.parse
- raise UsageError, "This command requires a tap argument from `brew tap`'s list" if args.remaining.empty?
-
- ARGV.named.each d... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/update-report.rb | @@ -13,7 +13,7 @@ module Homebrew
def update_preinstall_header
@update_preinstall_header ||= begin
- ohai "Auto-updated Homebrew!" if ARGV.include?("--preinstall")
+ ohai "Auto-updated Homebrew!" if args.preinstall?
true
end
end
@@ -109,7 +109,7 @@ def update_report
end
if... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/upgrade.rb | @@ -65,18 +65,18 @@ def upgrade
Install.perform_preinstall_checks
- if Homebrew.args.named.blank?
+ if args.no_named?
outdated = Formula.installed.select do |f|
f.outdated?(fetch_head: args.fetch_HEAD?)
end
exit 0 if outdated.empty?
else
- outdated = Homebrew.arg... | true |
Other | Homebrew | brew | a7fe0ed8472a67362793059cf633d3030ffa11d9.json | cmd: use more and cleanup new args APIs. | Library/Homebrew/cmd/uses.rb | @@ -38,24 +38,23 @@ def uses_args
description: "Show usage of <formula> by HEAD builds."
switch :debug
conflicts "--devel", "--HEAD"
+ min_named :formula
end
end
def uses
uses_args.parse
- raise FormulaUnspecifiedError if args.remaining.empty?
-
Formulary.ena... | true |
Other | Homebrew | brew | d6a8ff752f5df73e28f4252fc1539cb6f69bd486.json | docs/Homebrew-on-Linux.md: Use the bash installer | docs/Homebrew-on-Linux.md | @@ -23,7 +23,7 @@ The Homebrew package manager may be used on Linux and [Windows Subsystem for Lin
Paste at a terminal prompt:
```sh
-sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
+/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/inst... | false |
Other | Homebrew | brew | 7ccec0cdf0d521471d185b6a48bb3678cb536aaf.json | Use literal "python" | Library/Homebrew/language/python.rb | @@ -227,7 +227,7 @@ def create
Pathname.glob(@venv_root/"lib/python*/orig-prefix.txt").each do |prefix_file|
prefix_path = prefix_file.read
- prefix_path.sub! %r{^#{HOMEBREW_CELLAR}/#{python}/[^/]+}, Formula["python"].opt_prefix
+ prefix_path.sub! %r{^#{HOMEBREW_CELLAR}/p... | false |
Other | Homebrew | brew | b4b17fa892404a67049f72ea0408ee7998117004.json | keg: handle more exceptions on uninstall.
Fixes https://github.com/Homebrew/brew/issues/7110 | Library/Homebrew/keg.rb | @@ -135,7 +135,7 @@ def self.find_some_installed_dependents(kegs)
f = keg.to_formula
keg_formulae << f
[f.name, f.tap]
- rescue FormulaUnavailableError
+ rescue
# If the formula for the keg can't be found,
# fall back to the information in the tab.
[keg.name, keg.tab.tap]... | false |
Other | Homebrew | brew | f9481d4d35ca03706fe0d1885e5c83b89e89966e.json | python: Fix error in virtualenv_install_with_resources
Fixes #7115. | Library/Homebrew/language/python.rb | @@ -172,6 +172,7 @@ def virtualenv_install_with_resources(options = {})
wanted = pythons.select { |py| needs_python?(py) }
raise FormulaAmbiguousPythonError, self if wanted.size > 1
+ python = wanted.first
python = "python3" if python == "python"
end
venv = ... | false |
Other | Homebrew | brew | 67d012afccc1bb19b91e29bbd99b699579d6d0b3.json | search: add separate flag for formulae | Library/Homebrew/cmd/search.rb | @@ -36,6 +36,9 @@ def search_args
If no <text> is provided, list all locally available formulae (including tapped ones).
No online search is performed.
EOS
+ switch "--formulae",
+ description: "List all locally available formulae. "\
+ "No online searc... | true |
Other | Homebrew | brew | 67d012afccc1bb19b91e29bbd99b699579d6d0b3.json | search: add separate flag for formulae | docs/Manpage.md | @@ -425,6 +425,8 @@ search for *`text`* is extended online to `homebrew/core` and `homebrew/cask`.
If no *`text`* is provided, list all locally available formulae (including tapped
ones). No online search is performed.
+* `--formulae`:
+ List all locally available formulae. No online search is performed.
* `--cas... | true |
Other | Homebrew | brew | 67d012afccc1bb19b91e29bbd99b699579d6d0b3.json | search: add separate flag for formulae | manpages/brew-cask.1 | @@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
-.TH "BREW\-CASK" "1" "February 2020" "Homebrew" "brew-cask"
+.TH "BREW\-CASK" "1" "March 2020" "Homebrew" "brew-cask"
.
.SH "NAME"
\fBbrew\-cask\fR \- a friendly binary installer for macOS | true |
Other | Homebrew | brew | 67d012afccc1bb19b91e29bbd99b699579d6d0b3.json | search: add separate flag for formulae | 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" "February 2020" "Homebrew" "brew"
+.TH "BREW" "1" "March 2020" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The Missing Package Manager for macOS
@@ -548,6 +548,10 @@ Perform a substring search of cask ... | true |
Other | Homebrew | brew | 2f141c771a1a0d698c3ef0553ceb7e6a2317ef0a.json | workflows/tests: add missing newline. | .github/workflows/tests.yml | @@ -13,6 +13,7 @@ jobs:
steps:
- name: Set up Git repository
uses: actions/checkout@v1
+
- name: Set up Homebrew PATH
run: |
if [ "$RUNNER_OS" = "macOS" ]; then | false |
Other | Homebrew | brew | 5277f849d9dc30c8beac490fe163f3cb7ac7dba1.json | API: supply additional data for requirements | Library/Homebrew/formula.rb | @@ -1690,10 +1690,13 @@ def to_hash
end
hsh["requirements"] = requirements.map do |req|
+ req.name.prepend("maximum_") if req.try(:comparator) == "<="
{
"name" => req.name,
"cask" => req.cask,
"download" => req.download,
+ "version" => req.try(:version)... | true |
Other | Homebrew | brew | 5277f849d9dc30c8beac490fe163f3cb7ac7dba1.json | API: supply additional data for requirements | Library/Homebrew/requirements/java_requirement.rb | @@ -3,10 +3,10 @@
require "language/java"
class JavaRequirement < Requirement
- attr_reader :java_home
-
fatal true
+ attr_reader :java_home, :version
+
# A strict Java 8 requirement (1.8) should prompt the user to install
# an OpenJDK 1.8 distribution. Versions newer than Java 8 are not
# completel... | true |
Other | Homebrew | brew | 5277f849d9dc30c8beac490fe163f3cb7ac7dba1.json | API: supply additional data for requirements | Library/Homebrew/requirements/macos_requirement.rb | @@ -5,6 +5,8 @@
class MacOSRequirement < Requirement
fatal true
+ attr_reader :comparator, :version
+
def initialize(tags = [], comparator: ">=")
if comparator == "==" && tags.first.respond_to?(:map)
@version = tags.shift.map { |s| MacOS::Version.from_symbol(s) }
@@ -54,6 +56,10 @@ def message(typ... | true |
Other | Homebrew | brew | 5277f849d9dc30c8beac490fe163f3cb7ac7dba1.json | API: supply additional data for requirements | Library/Homebrew/requirements/xcode_requirement.rb | @@ -5,6 +5,8 @@
class XcodeRequirement < Requirement
fatal true
+ attr_reader :version
+
satisfy(build_env: false) { xcode_installed_version }
def initialize(tags = []) | true |
Other | Homebrew | brew | 352774e80f9663fd6562bff6e7f5426dd5609d0c.json | Add deleted casks to report dump.
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/update-report.rb | @@ -426,6 +426,7 @@ def dump
dump_formula_report :R, "Renamed Formulae"
dump_formula_report :D, "Deleted Formulae"
dump_formula_report :MC, "Updated Casks"
+ dump_formula_report :DC, "Deleted Casks"
end
private | false |
Other | Homebrew | brew | 943beaec1ed6cbe551db9336a9e8d0c2f87448b5.json | Versions docs: Add note on unstable versions | docs/Versions.md | @@ -9,6 +9,7 @@ Versioned formulae we include in [homebrew/core](https://github.com/homebrew/hom
* Versioned software should build on all Homebrew's supported versions of macOS.
* Versioned formulae should differ in major/minor (not patch) versions from the current stable release. This is because patch versions ind... | false |
Other | Homebrew | brew | 79a3d3568b5f5880947d7f857fbe9630b55cc492.json | python: add rewrite function for generic shebangs
From PEP 394
https://www.python.org/dev/peps/pep-0394/#for-python-script-publishers
In cases where the script is expected to be executed outside virtual environments,
developers will need to be aware of the following discrepancies across platforms and installation met... | Library/Homebrew/language/python.rb | @@ -88,6 +88,17 @@ def self.setup_install_args(prefix)
]
end
+ def self.rewrite_python_shebang(python_path)
+ Pathname(".").find do |f|
+ regex = %r{^#! ?/usr/bin/(env )?python([23](\.\d{1,2})?)$}
+ maximum_regex_length = "#! /usr/bin/env pythonx.yyy$".length
+ next unless f.f... | false |
Other | Homebrew | brew | b80af7837aea59188b9fffc7944dd0c2ecc93a42.json | bump-formula-pr: add missing URL escapes | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -282,12 +282,12 @@ def bump_formula_pr
]
elsif new_mirrors
replacement_pairs << [
- /^( +)(mirror \"#{new_mirrors.last}\"\n)/m,
+ /^( +)(mirror \"#{Regexp.escape(new_mirrors.last)}\"\n)/m,
"\\1\\2\\1version \"#{forced_version}\"\n",
]
... | false |
Other | Homebrew | brew | aac200a53db859ab1aa12284627eacc6f3e92cf0.json | node: detect root via Process.uid | Library/Homebrew/language/node.rb | @@ -50,7 +50,7 @@ def self.std_npm_install_args(libexec)
#{Dir.pwd}/#{pack}
]
- args << "--unsafe-perm" if ENV["USER"] == "root"
+ args << "--unsafe-perm" if Process.uid.zero?
args
end | false |
Other | Homebrew | brew | 79a1500f2b7416cac9da55f02e8ba1d09e66404f.json | node: add --unsafe-perm to std_args only if run as root | Library/Homebrew/language/node.rb | @@ -41,15 +41,18 @@ def self.std_npm_install_args(libexec)
pack = pack_for_installation
# npm install args for global style module format installed into libexec
- %W[
+ args = %W[
-ddd
--global
- --unsafe-perm
--build-from-source
--#{npm_cache_config}... | false |
Other | Homebrew | brew | 6874c79375176897b86215c410808fdacb034a51.json | node: add --unsafe-perm to std_args | Library/Homebrew/language/node.rb | @@ -44,6 +44,7 @@ def self.std_npm_install_args(libexec)
%W[
-ddd
--global
+ --unsafe-perm
--build-from-source
--#{npm_cache_config}
--prefix=#{libexec} | false |
Other | Homebrew | brew | 11ebc27e0a1659ce23993bfa6a96470fcc76f477.json | version: parse tag if detecting version | Library/Homebrew/test/version_spec.rb | @@ -684,10 +684,15 @@
.to be_detected_from("https://php.net/get/php-7.1.10.tar.gz/from/this/mirror")
end
- specify "from URL" do
+ specify "from tag" do
expect(described_class.create("1.2.3"))
.to be_detected_from("https://github.com/foo/bar.git", tag: "v1.2.3")
end
+
+ spe... | true |
Other | Homebrew | brew | 11ebc27e0a1659ce23993bfa6a96470fcc76f477.json | version: parse tag if detecting version | Library/Homebrew/version.rb | @@ -201,7 +201,7 @@ def detected_from_url?
def self.detect(url, specs)
if specs.key?(:tag)
- FromURL.new(specs[:tag][/((?:\d+\.)*\d+)/, 1])
+ FromURL.parse(specs[:tag])
else
FromURL.parse(url)
end | true |
Other | Homebrew | brew | 00aa4b7a0bb5358dfc55107231b979407ba7140c.json | Apply suggestions from code review
Co-Authored-By: Bo Anderson <mail@boanderson.me> | Library/Homebrew/cmd/upgrade.rb | @@ -187,7 +187,6 @@ def upgrade_formula(f)
upgrade_version = if f.optlinked?
"#{Keg.new(f.opt_prefix).version} -> #{f.pkg_version}"
- " #{f.pkg_version} #{fi.options.to_a.join " "}"
else
"-> #{f.pkg_version}"
end | false |
Other | Homebrew | brew | 4bde62b651a3d08543f54660871cafb0ae8c0da7.json | Apply suggestions from code review
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/upgrade.rb | @@ -185,12 +185,13 @@ def upgrade_formula(f)
end
fi.prelude
- if f.optlinked?
- oh1 "Upgrading #{Formatter.identifier(f.full_specified_name)} #{Keg.new(f.opt_prefix).version} ->"\
+ upgrade_version = if f.optlinked?
+ "#{Keg.new(f.opt_prefix).version} -> #{f.pkg_version}"
" #{f.pkg_ve... | false |
Other | Homebrew | brew | da5d804bd9fca474eb2a7f484559ad9cd1534d89.json | Inline versions of upgraded formulae | Library/Homebrew/cmd/upgrade.rb | @@ -185,7 +185,11 @@ def upgrade_formula(f)
end
fi.prelude
- oh1 "Upgrading #{Formatter.identifier(f.full_specified_name)} #{fi.options.to_a.join " "}"
+ if f.optlinked?
+ oh1 "Upgrading #{Formatter.identifier(f.full_specified_name)} #{Keg.new(f.opt_prefix).version} -> #{f.pkg_version} #{fi.optio... | false |
Other | Homebrew | brew | 79811537fbef39b2efad2036544e0bfdc33da278.json | rubocop/urls: add go@1.13 to binary URLs whitelist | Library/Homebrew/rubocops/urls.rb | @@ -18,6 +18,7 @@ class Urls < FormulaCop
go@1.10
go@1.11
go@1.12
+ go@1.13
haskell-stack
ldc
mlton | false |
Other | Homebrew | brew | 10f529d091b6fd7db7e054191bac55dc19f24038.json | Docs: Add guides for common cases
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com> | docs/Adding-Software-to-Homebrew.md | @@ -0,0 +1,34 @@
+# Adding Software to Homebrew
+
+Are you missing your favorite software in Homebrew? Then you're the perfect person to resolve this problem.
+
+Before you start, please check the open pull requests for [homebrew-core](https://github.com/Homebrew/homebrew-core/pulls) or [linuxbrew-core](https://github.... | true |
Other | Homebrew | brew | 10f529d091b6fd7db7e054191bac55dc19f24038.json | Docs: Add guides for common cases
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com> | docs/Creating-a-Homebrew-Issue.md | @@ -0,0 +1,5 @@
+# Creating a Homebrew Issue
+
+First, check to make sure your issue is not listed in the [FAQ](FAQ.md) or [Common Issues](Common-Issues.md) and can't otherwise be resolved with the information in the [Tips and Tricks](Tips-N'-Tricks.md) documentation. Next, go through the steps in the [Troubleshooting ... | true |
Other | Homebrew | brew | 10f529d091b6fd7db7e054191bac55dc19f24038.json | Docs: Add guides for common cases
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com> | docs/README.md | @@ -27,6 +27,10 @@
- [Xcode](Xcode.md)
- [Kickstarter Supporters](Kickstarter-Supporters.md)
+- [Creating a Homebrew Issue](Creating-a-Homebrew-Issue.md)
+- [Updating Software in Homebrew](Updating-Software-in-Homebrew.md)
+- [Adding Software to Homebrew](Adding-Software-to-Homebrew.md)
+
## Contributors
- [How... | true |
Other | Homebrew | brew | 10f529d091b6fd7db7e054191bac55dc19f24038.json | Docs: Add guides for common cases
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com> | docs/Updating-Software-in-Homebrew.md | @@ -0,0 +1,13 @@
+# Updating Software in Homebrew
+
+Did you find something in Homebrew that wasn't the latest version? You can help yourself and others by submitting a pull request to update the formula.
+
+First, check the pull requests in the [homebrew-core](https://github.com/Homebrew/homebrew-core/pulls) or [linux... | true |
Other | Homebrew | brew | a24477dad64ed8c7069811b6f0e3390973b9c9cf.json | bump-formula-pr: fix output when listing guesses | Library/Homebrew/dev-cmd/bump-formula-pr.rb | @@ -146,7 +146,7 @@ def bump_formula_pr
if guesses.count == 1
formula = guesses.shift
elsif guesses.count > 1
- odie "Couldn't guess formula for sure; could be one of these:\n#{guesses}"
+ odie "Couldn't guess formula for sure; could be one of these:\n#{guesses.map(&:name).join(", "... | false |
Other | Homebrew | brew | 29006396dd4fd75602b44ebc81d7a30181b2d55f.json | audit: check apache.org URLs | Library/Homebrew/rubocops/urls.rb | @@ -41,6 +41,11 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
problem "Please don't use fossies.org in the url (using as a mirror is fine)"
end
+ apache_pattern = %r{^https?://(?:[^/]*\.)?apache\.org/(?:dyn/closer\.cgi\?path=/?|dist/)(.*)}i
+ audit_u... | true |
Other | Homebrew | brew | 29006396dd4fd75602b44ebc81d7a30181b2d55f.json | audit: check apache.org URLs | Library/Homebrew/test/rubocops/urls_spec.rb | @@ -18,6 +18,11 @@
"url" => "http://tools.ietf.org/tools/rfcmarkup/rfcmarkup-1.119.tgz",
"msg" => "Please use https:// for http://tools.ietf.org/tools/rfcmarkup/rfcmarkup-1.119.tgz",
"col" => 2,
+ }, {
+ "url" => "https://apache.org/dyn/closer.cgi?path=/apr/apr-1.7.0.tar.bz2",
+ "msg" ... | true |
Other | Homebrew | brew | f11ddb9aab4a6ebfa6a4be8888cca6b6908944aa.json | log: use user path
Without this, one can't use a custom pager, if it's present in
non-standard PATH, like for example Homebrew on Linux prefix. | Library/Homebrew/cmd/log.rb | @@ -29,6 +29,10 @@ def log_args
def log
log_args.parse
+ # As this command is simplifying user run commands then let's just use a
+ # user path, too.
+ ENV["PATH"] = ENV["HOMEBREW_PATH"]
+
if ARGV.named.empty?
git_log HOMEBREW_REPOSITORY
else | false |
Other | Homebrew | brew | 59747144539a3c394b6c4e5e27948df41bec22d2.json | pull: add more docs comment context. | Library/Homebrew/dev-cmd/pull.rb | @@ -289,6 +289,7 @@ def merge_commit?(url)
# Use `homebrew` remote if HOMEBREW_FORCE_HOMEBREW_ON_LINUX env variable is set.
# The `homebrew` remote points to homebrew-core tap and is used by Linux maintainers.
+ # See https://docs.brew.sh/Homebrew-linuxbrew-core-Maintainer-Guide#preparation
remote =... | false |
Other | Homebrew | brew | f60e2a0c4a496ddfd2e2f69f499cb229deba3f75.json | Add ghc@8.6 to binary formula URLs whitelist | Library/Homebrew/rubocops/urls.rb | @@ -13,6 +13,7 @@ class Urls < FormulaCop
fpc
ghc
ghc@8.2
+ ghc@8.6
go
go@1.9
go@1.10 | false |
Other | Homebrew | brew | 7e1da4a037db33600a1ba61f343c67fe132b090e.json | README: add missing maintainers. | README.md | @@ -58,7 +58,7 @@ Homebrew's [Technical Steering Committee](https://docs.brew.sh/Homebrew-Governan
Homebrew/brew's Linux maintainers are [Michka Popoff](https://github.com/imichka), [Shaun Jackman](https://github.com/sjackman), [Dawid Dziurla](https://github.com/dawidd6) and [Issy Long](https://github.com/issyl0).
... | true |
Other | Homebrew | brew | 7e1da4a037db33600a1ba61f343c67fe132b090e.json | README: add missing maintainers. | docs/Manpage.md | @@ -1293,7 +1293,7 @@ Homebrew's Technical Steering Committee is Michka Popoff, FX Coudert, Markus Rei
Homebrew/brew's Linux maintainers are Michka Popoff, Shaun Jackman, Dawid Dziurla and Issy Long.
-Homebrew's other current maintainers are Claudia Pellegrino, Rui Chen, Vitor Galvao, Caleb Xu, Gautham Goli, Steve... | true |
Other | Homebrew | brew | 7e1da4a037db33600a1ba61f343c67fe132b090e.json | README: add missing maintainers. | manpages/brew.1 | @@ -1581,7 +1581,7 @@ Homebrew\'s Technical Steering Committee is Michka Popoff, FX Coudert, Markus Re
Homebrew/brew\'s Linux maintainers are Michka Popoff, Shaun Jackman, Dawid Dziurla and Issy Long\.
.
.P
-Homebrew\'s other current maintainers are Claudia Pellegrino, Rui Chen, Vitor Galvao, Caleb Xu, Gautham Goli,... | true |
Other | Homebrew | brew | 6ce083d29402526f52892a53dd2efbf80661e522.json | rubocop.yml: enable new checks. | Library/.rubocop_shared.yml | @@ -50,6 +50,14 @@ Style/CollectionMethods:
Style/FormatStringToken:
EnforcedStyle: annotated
+# autocorrectable and more readable
+Style/HashEachMethods:
+ Enabled: true
+Style/HashTransformKeys:
+ Enabled: true
+Style/HashTransformValues:
+ Enabled: true
+
# This shouldn't be enabled until LineLength is low... | false |
Other | Homebrew | brew | e9419e48e56356ce3925406078d89b353fe5dba3.json | tap: update docs to note non-shallow default.
Also, while we're here, `rsync` and `git` are not acronyms. | Library/Homebrew/cmd/tap.rb | @@ -22,12 +22,11 @@ def tap_args
any transport protocol that `git`(1) handles. The one-argument form of `tap`
simplifies but also limits. This two-argument command makes no
assumptions, so taps can be cloned from places other than GitHub and
- using protocols other than HTTPS, e.g. SSH... | true |
Other | Homebrew | brew | e9419e48e56356ce3925406078d89b353fe5dba3.json | tap: update docs to note non-shallow default.
Also, while we're here, `rsync` and `git` are not acronyms. | docs/Manpage.md | @@ -496,10 +496,10 @@ With *`URL`* specified, tap a formula repository from anywhere, using any
transport protocol that `git`(1) handles. The one-argument form of `tap`
simplifies but also limits. This two-argument command makes no assumptions, so
taps can be cloned from places other than GitHub and using protocols ... | true |
Other | Homebrew | brew | e9419e48e56356ce3925406078d89b353fe5dba3.json | tap: update docs to note non-shallow default.
Also, while we're here, `rsync` and `git` are not acronyms. | manpages/brew.1 | @@ -627,11 +627,11 @@ If no arguments are provided, list all installed taps\.
With \fIURL\fR unspecified, tap a formula repository from GitHub using HTTPS\. Since so many taps are hosted on GitHub, this command is a shortcut for \fBbrew tap\fR \fIuser\fR\fB/\fR\fIrepo\fR \fBhttps://github\.com/\fR\fIuser\fR\fB/homebre... | true |
Other | Homebrew | brew | c46a30b5757f901d111dafc585e53df35a46e407.json | brew: remove most traces of python@2 | Library/Homebrew/dev-cmd/audit.rb | @@ -508,7 +508,6 @@ def audit_versioned_keg_only
bash-completion@2
gnupg@1.4
lua@5.1
- python@2
numpy@1.16
].freeze
@@ -706,7 +705,6 @@ def audit_specs
versioned_head_spec = %w[
bash-completion@2
imagemagick@6
- python@2
... | true |
Other | Homebrew | brew | c46a30b5757f901d111dafc585e53df35a46e407.json | brew: remove most traces of python@2 | Library/Homebrew/exceptions.rb | @@ -335,8 +335,8 @@ class FormulaAmbiguousPythonError < RuntimeError
def initialize(formula)
super <<~EOS
The version of python to use with the virtualenv in the `#{formula.full_name}` formula
- cannot be guessed automatically. If the simultaneous use of python and python@2
- is intentional, pl... | true |
Other | Homebrew | brew | c46a30b5757f901d111dafc585e53df35a46e407.json | brew: remove most traces of python@2 | Library/Homebrew/formula.rb | @@ -2386,8 +2386,6 @@ def go_resource(name, &block)
# depends_on "postgresql" if build.without? "sqlite"</pre>
# <pre># Python 3.x if the `--with-python` is given to `brew install example`
# depends_on "python3" => :optional</pre>
- # <pre># Python 2.7:
- # depends_on "python@2"</pre>
def depe... | true |
Other | Homebrew | brew | c46a30b5757f901d111dafc585e53df35a46e407.json | brew: remove most traces of python@2 | Library/Homebrew/language/python.rb | @@ -26,7 +26,6 @@ def self.site_packages(python = "python3.7")
def self.each_python(build, &block)
original_pythonpath = ENV["PYTHONPATH"]
pythons = { "python@3" => "python3",
- "python@2" => "python2.7",
"pypy" => "pypy",
"pypy3" => "pypy... | true |
Other | Homebrew | brew | c46a30b5757f901d111dafc585e53df35a46e407.json | brew: remove most traces of python@2 | docs/Gems,-Eggs-and-Perl-Modules.md | @@ -27,25 +27,7 @@ writable location. But if you installed Homebrew as we recommend,
`/usr/local` will be writable without sudo. So now you are good to
install the development tools you need without risking the use of sudo.
-## Python packages (eggs) without sudo
-
-Rather than changing the rights on `/Library/Pyth... | true |
Other | Homebrew | brew | c46a30b5757f901d111dafc585e53df35a46e407.json | brew: remove most traces of python@2 | docs/Homebrew-and-Python.md | @@ -4,45 +4,33 @@ This page describes how Python is handled in Homebrew for users. See [Python for
Homebrew should work with any [CPython](https://stackoverflow.com/questions/2324208/is-there-any-difference-between-cpython-and-python) and defaults to the macOS system Python.
-Homebrew provides formulae to brew Pyt... | true |
Other | Homebrew | brew | c46a30b5757f901d111dafc585e53df35a46e407.json | brew: remove most traces of python@2 | docs/Homebrew-homebrew-core-Merge-Checklist.md | @@ -28,7 +28,7 @@ Check for:
- other teams drop new version with minor release 0 but promote it to stable only after a few minor releases
- if the software uses only hosted version control (such as GitHub, GitLab or Bitbucket), the release should be tagged and if upstream marks latest/pre-releases, PR must use la... | true |
Other | Homebrew | brew | c46a30b5757f901d111dafc585e53df35a46e407.json | brew: remove most traces of python@2 | docs/Python-for-Formula-Authors.md | @@ -149,7 +149,7 @@ Sometimes we have to edit a `Makefile` on-the-fly to use our prefix for the Pyth
Libraries built for Python 3 should include `depends_on "python"`, which will bottle against Homebrew's Python 3.x. Python 2.x libraries must function when they are installed against either the system Python or brewe... | true |
Other | Homebrew | brew | 2c86e7e12794ffbd464a539273cd042187822ab4.json | feat: expose casks in tap.to_hash for tap-info --json | Library/Homebrew/tap.rb | @@ -529,6 +529,7 @@ def to_hash
"formula_names" => formula_names,
"formula_files" => formula_files.map(&:to_s),
"command_files" => command_files.map(&:to_s),
+ "cask_files" => cask_files.map(&:to_s),
"pinned" => pinned?,
}
| false |
Other | Homebrew | brew | 486a557cf527761d9b5a0cf54674f4d562c7bfcb.json | rubocop/lines: add protobuf to whitelist | Library/Homebrew/rubocops/lines.rb | @@ -439,6 +439,7 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
open-mpi
openssl@1.1
pcre
+ protobuf
wolfssl
xz
].include?(@formula_name) | false |
Other | Homebrew | brew | 967b9b811238c0750f16a6cea902379e5469f15d.json | deps: give consistent results
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com> | Library/Homebrew/cmd/deps.rb | @@ -62,6 +62,13 @@ def deps
Formulary.enable_factory_cache!
recursive = !args.send("1?")
+ installed = args.installed? || ARGV.formulae.all?(&:opt_or_installed_prefix_keg)
+
+ @use_runtime_dependencies = installed && recursive &&
+ !args.include_build? &&
+ ... | false |
Other | Homebrew | brew | 6d46a4eed744229933e490b8709d11f7ec12d8da.json | cpu: add new Intel names | Library/Homebrew/extend/os/linux/hardware/cpu.rb | @@ -49,14 +49,18 @@ def family
:merom
when 0x0d
:dothan
- when 0x36, 0x26, 0x1c
+ when 0x1c, 0x26, 0x27, 0x35, 0x36
:atom
- when 0x3c, 0x3f, 0x46
+ when 0x3c, 0x3f, 0x45, 0x46
:haswell
when 0x3d, 0x47, 0x4f, 0x... | false |
Other | Homebrew | brew | f2b8d4ec08ca7c452337490c4e0286a2cfbe3518.json | Dockerfile: use normal `brew cleanup`. | Dockerfile | @@ -45,4 +45,4 @@ RUN HOMEBREW_NO_ANALYTICS=1 HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/core \
&& chmod -R g+w,o-w /home/linuxbrew/.linuxbrew \
&& rm -rf ~/.cache \
&& brew install-bundler-gems \
- && brew cleanup -s
+ && brew cleanup | false |
Other | Homebrew | brew | 9eedb1e2ca85b123ca69c11a787687476fb594b8.json | system_command_result_spec: fix frozen objects. | Library/Homebrew/test/system_command_result_spec.rb | @@ -120,7 +120,7 @@
context "when verbose" do
before do
- allow(Homebrew.args).to receive(:verbose?).and_return(true)
+ allow(Homebrew).to receive(:args).and_return(OpenStruct.new("verbose?" => true))
end
it "warns about garbage" do
@@ -144,7 +144,7 @@
co... | false |
Other | Homebrew | brew | eec8028d4fcde1a03eeb345971114a21e8e50c2f.json | [Linux] docs: Update sponsors to say GitHub Actions not CircleCI
- We switched from Circle CI to Azure Pipelines, then to GitHub Actions.
- I can't find any directly linkable official GitHub logo assets on
https://github.com/logos and I don't want to upload an image directly
to this repo. So, remove the image. If ... | docs/Homebrew-on-Linux.md | @@ -95,8 +95,6 @@ eval $(~/.linuxbrew/bin/brew shellenv)
## Sponsors
-Our binary packages (bottles) are built on [CircleCI](https://circleci.com/) and hosted by [Bintray](https://bintray.com/linuxbrew).
-
-[<img alt="CircleCI logo" style="height:1in" src="https://assets.brandfolder.com/otz6k5-cj8pew-e4rk9u/origina... | false |
Other | Homebrew | brew | 5ef9b8863a59356395a1bc39904083b531117c97.json | Move urls code and add devel urls | Library/Homebrew/formula.rb | @@ -1626,13 +1626,7 @@ def to_hash
"head" => head&.version&.to_s,
"bottle" => !bottle_specification.checksums.empty?,
},
- "urls" => {
- "stable" => {
- "url" => stable.url,
- "tag" => stable.specs&.dig(:tag),
- "revision" =... | false |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/brew.rb | @@ -63,19 +63,20 @@ class MissingEnvironmentVariables < RuntimeError; end
ENV["PATH"] = path
- if cmd
- internal_cmd = require? HOMEBREW_LIBRARY_PATH/"cmd"/cmd
+ require "commands"
- unless internal_cmd
- internal_dev_cmd = require? HOMEBREW_LIBRARY_PATH/"dev-cmd"/cmd
- internal_cmd = interna... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/cli/parser.rb | @@ -17,11 +17,7 @@ def self.parse(args = ARGV, &block)
end
def self.from_cmd_path(cmd_path)
- cmd_method_prefix = cmd_path.basename(cmd_path.extname)
- .to_s
- .sub(/^brew-/, "")
- .tr("-", "_... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/cmd/command.rb | @@ -23,13 +23,8 @@ def command
raise UsageError, "This command requires a command argument" if args.remaining.empty?
- args.remaining.each do |c|
- cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(c, c)
+ args.remaining.each do |cmd|
path = Commands.path(cmd)
- cmd_paths = PATH.new(ENV["PAT... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/cmd/commands.rb | @@ -27,54 +27,18 @@ def commands
commands_args.parse
if args.quiet?
- cmds = internal_commands
- cmds += external_commands
- cmds += internal_developer_commands
- cmds += HOMEBREW_INTERNAL_COMMAND_ALIASES.keys if args.include_aliases?
- puts Formatter.columns(cmds.sort)
+ puts ... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/commands.rb | @@ -1,12 +1,138 @@
# frozen_string_literal: true
module Commands
- def self.path(cmd)
+ module_function
+
+ HOMEBREW_CMD_PATH = (HOMEBREW_LIBRARY_PATH/"cmd").freeze
+ HOMEBREW_DEV_CMD_PATH = (HOMEBREW_LIBRARY_PATH/"dev-cmd").freeze
+ HOMEBREW_INTERNAL_COMMAND_ALIASES = {
+ "ls" => "list",
+ "hom... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/dev-cmd/man.rb | @@ -59,8 +59,8 @@ def build_man_page
template = (SOURCE_PATH/"brew.1.md.erb").read
variables = OpenStruct.new
- variables[:commands] = generate_cmd_manpages("#{HOMEBREW_LIBRARY_PATH}/cmd/*.{rb,sh}")
- variables[:developer_commands] = generate_cmd_manpages("#{HOMEBREW_LIBRARY_PATH}/dev-cmd/{*.rb,sh}")
... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/global.rb | @@ -115,25 +115,6 @@ def auditing?
nil
end.compact.freeze
-HOMEBREW_INTERNAL_COMMAND_ALIASES = {
- "ls" => "list",
- "homepage" => "home",
- "-S" => "search",
- "up" => "update",
- "ln" => "link",
- "instal" => "install", # gem does the same
- "uninstal" => "u... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/help.rb | @@ -42,16 +42,11 @@ module Help
def help(cmd = nil, flags = {})
# Resolve command aliases and find file containing the implementation.
- if cmd
- cmd = HOMEBREW_INTERNAL_COMMAND_ALIASES.fetch(cmd, cmd)
- path = Commands.path(cmd)
- path ||= which("brew-#{cmd}")
- path ||= ... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/test/cmd/commands_spec.rb | @@ -1,6 +1,5 @@
# frozen_string_literal: true
-require "cmd/command"
require "cmd/commands"
require "fileutils"
@@ -18,82 +17,3 @@
.and be_a_success
end
end
-
-RSpec.shared_context "custom internal commands" do
- let(:cmds) do
- [
- # internal commands
- HOMEBREW_LIBRARY_PATH/"cmd/rbcmd.... | true |
Other | Homebrew | brew | 8a9dcad2c708ce945695029c5af79b4b3965a4de.json | Move more command handling logic to commands.rb. | Library/Homebrew/test/commands_spec.rb | @@ -0,0 +1,80 @@
+# frozen_string_literal: true
+
+require "commands"
+
+RSpec.shared_context "custom internal commands" do
+ let(:cmds) do
+ [
+ # internal commands
+ Commands::HOMEBREW_CMD_PATH/"rbcmd.rb",
+ Commands::HOMEBREW_CMD_PATH/"shcmd.sh",
+
+ # internal developer-commands
+ Comma... | true |
Other | Homebrew | brew | 82fde4e1e520934635aa9a6212c7954e9d68a134.json | Add stable url, tag and revision to json output | Library/Homebrew/formula.rb | @@ -1626,6 +1626,13 @@ def to_hash
"head" => head&.version&.to_s,
"bottle" => !bottle_specification.checksums.empty?,
},
+ "urls" => {
+ "stable" => {
+ "url" => stable.url,
+ "tag" => stable.specs&.dig(:tag),
+ "revision" =... | false |
Other | Homebrew | brew | acde828a45c452b54413a3cd711752343e54f3cf.json | ARGV: Replace ARGV.verbose? with Homebrew.args.verbose? | Library/Homebrew/cleaner.rb | @@ -58,7 +58,7 @@ def prune
# actual files gets removed correctly.
dirs.reverse_each do |d|
if d.children.empty?
- puts "rmdir: #{d} (empty)" if ARGV.verbose?
+ puts "rmdir: #{d} (empty)" if Homebrew.args.verbose?
d.rmdir
end
end | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.