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 | 57d7d4c9dd13fe5c4c17ac29ff7b3b093b03eadf.json | brew.rb: duplicate MissingEnvironmentVariables exception.
Fixes #5592. | Library/Homebrew/brew.rb | @@ -10,6 +10,9 @@
raise "Homebrew must be run under Ruby 2.3! You're running #{RUBY_VERSION}."
end
+# Also define here so we can rescue regardless of location.
+class MissingEnvironmentVariables < RuntimeError; end
+
begin
require_relative "global"
rescue MissingEnvironmentVariables => e | false |
Other | Homebrew | brew | e43d400fd20256411851b3b58ef58b27c3d27cde.json | gist-logs: add missing install require.
Fixes #5586 | Library/Homebrew/cmd/gist-logs.rb | @@ -15,6 +15,7 @@
#: If no logs are found, an error message is presented.
require "formula"
+require "install"
require "system_config"
require "stringio"
require "socket" | false |
Other | Homebrew | brew | e2e4f93f06b37390ec7dbf4f8e6f498a068c1eaa.json | search: Add descriptions to option declarations | Library/Homebrew/cmd/search.rb | @@ -41,20 +41,38 @@ module Homebrew
},
}.freeze
- def search(argv = ARGV)
- CLI::Parser.parse(argv) do
- switch "--desc"
+ def search_args
+ Homebrew::CLI::Parser.new do
+ usage_banner <<~EOS
+ `search`, `-S` [<options>] (<text>|`/`<text>`/`)
+
+ Perform a substring search of cask tokens and formula names for <text>. If <text>
+ is surrounded with slashes, then it is interpreted as a regular expression.
+ The search for <text> is extended online to `homebrew/core` and `homebrew/cask`.
+
+ If no <text> is passed, display all locally available formulae (including tapped ones).
+ No online search is performed.
+ EOS
+ switch "--casks",
+ description: "Display all locally available casks (including tapped ones). "\
+ "No online search is performed."
+ switch "--desc",
+ description: "search formulae with a description matching <text> and casks with "\
+ "a name matching <text>."
package_manager_switches = PACKAGE_MANAGERS.keys.map { |name| "--#{name}" }
-
package_manager_switches.each do |s|
- switch s
+ switch s,
+ description: "Search for <text> in the given package manager's list."
end
-
- switch "--casks"
-
+ switch :verbose
+ switch :debug
conflicts(*package_manager_switches)
end
+ end
+
+ def search
+ search_args.parse
if package_manager = PACKAGE_MANAGERS.find { |name,| args[:"#{name}?"] }
_, url = package_manager | false |
Other | Homebrew | brew | 8bfde013f631ec5026313c9194ec2fff8cfc5f01.json | utils: fix SVN remote test on Mojave.
For some reason Mojave needs the SSL args always set otherwise this
will always fail waiting for interactivity.
Also, while debugging this I noticed that `utils.rb` had a failure
expecting an integer so fix that too. | Library/Homebrew/utils.rb | @@ -291,7 +291,7 @@ def inject_dump_stats!(the_module, pattern)
$times = {}
at_exit do
- col_width = [$times.keys.map(&:size).max + 2, 15].max
+ col_width = [$times.keys.map(&:size).max.to_i + 2, 15].max
$times.sort_by { |_k, v| v }.each do |method, time|
puts format("%-*s %0.4f sec", col_width, "#{method}:", time)
end | true |
Other | Homebrew | brew | 8bfde013f631ec5026313c9194ec2fff8cfc5f01.json | utils: fix SVN remote test on Mojave.
For some reason Mojave needs the SSL args always set otherwise this
will always fail waiting for interactivity.
Also, while debugging this I noticed that `utils.rb` had a failure
expecting an integer so fix that too. | Library/Homebrew/utils/svn.rb | @@ -12,7 +12,9 @@ def self.svn_available?
def self.svn_remote_exists?(url)
return true unless svn_available?
- ssl_args = ["--non-interactive", "--trust-server-cert"] if ENV["HOMEBREW_TEST_ONLINE"]
- quiet_system "svn", "ls", url, "--depth", "empty", *ssl_args
+ # OK to unconditionally trust here because we're just checking if
+ # a URL exists.
+ quiet_system "svn", "ls", url, "--depth", "empty",
+ "--non-interactive", "--trust-server-cert"
end
end | true |
Other | Homebrew | brew | 234e4aec96297145e1760bc3d8ff6cc9f6f64713.json | Improve use of default_prefix? in tests. | Library/Homebrew/os/linux/global.rb | @@ -1,5 +1,5 @@
module Homebrew
- DEFAULT_PREFIX = if ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"]
+ DEFAULT_PREFIX ||= if ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"]
"/usr/local".freeze
else
"/home/linuxbrew/.linuxbrew".freeze | true |
Other | Homebrew | brew | 234e4aec96297145e1760bc3d8ff6cc9f6f64713.json | Improve use of default_prefix? in tests. | Library/Homebrew/test/diagnostic_checks_spec.rb | @@ -164,7 +164,7 @@
end
specify "#check_homebrew_prefix" do
- # the integration tests are run in a special prefix
+ allow(Homebrew).to receive(:default_prefix?).and_return(false)
expect(subject.check_homebrew_prefix)
.to match("Your Homebrew's prefix is not #{Homebrew::DEFAULT_PREFIX}")
end | true |
Other | Homebrew | brew | 234e4aec96297145e1760bc3d8ff6cc9f6f64713.json | Improve use of default_prefix? in tests. | Library/Homebrew/test/support/lib/config.rb | @@ -41,3 +41,8 @@
TEST_SHA1 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze
TEST_SHA256 = "deadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef".freeze
+
+# For testing's sake always assume the default prefix
+module Homebrew
+ DEFAULT_PREFIX = HOMEBREW_PREFIX.to_s.freeze
+end | true |
Other | Homebrew | brew | 234e4aec96297145e1760bc3d8ff6cc9f6f64713.json | Improve use of default_prefix? in tests. | Library/Homebrew/test/utils/analytics_spec.rb | @@ -9,19 +9,18 @@
end
it "returns OS_VERSION and prefix when HOMEBREW_PREFIX is a custom prefix" do
- stub_const("HOMEBREW_PREFIX", "blah")
+ allow(Homebrew).to receive(:default_prefix?).and_return(false)
expect(described_class.os_prefix_ci).to include("#{OS_VERSION}, #{described_class.custom_prefix_label}")
end
+ it "does not include prefix when HOMEBREW_PREFIX is the default prefix" do
+ expect(described_class.os_prefix_ci).not_to include(described_class.custom_prefix_label)
+ end
+
it "includes CI when ENV['CI'] is set" do
ENV["CI"] = "true"
expect(described_class.os_prefix_ci).to include("CI")
end
-
- it "does not include prefix when HOMEBREW_PREFIX is the default prefix" do
- stub_const("HOMEBREW_PREFIX", Homebrew::DEFAULT_PREFIX)
- expect(described_class.os_prefix_ci).not_to include(described_class.custom_prefix_label)
- end
end
end
| true |
Other | Homebrew | brew | 234e4aec96297145e1760bc3d8ff6cc9f6f64713.json | Improve use of default_prefix? in tests. | Library/Homebrew/utils/analytics.rb | @@ -16,7 +16,7 @@ def clear_os_prefix_ci
def os_prefix_ci
@os_prefix_ci ||= begin
os = OS_VERSION
- prefix = ", #{custom_prefix_label}" if Homebrew.default_prefix?
+ prefix = ", #{custom_prefix_label}" unless Homebrew.default_prefix?
ci = ", CI" if ENV["CI"]
"#{os}#{prefix}#{ci}"
end | true |
Other | Homebrew | brew | c3a46bc57046a11e3f95dffc11ac57842c887f38.json | os/mac/diagnostic: remove some old/unneeded checks. | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -11,7 +11,6 @@ def development_tools_checks
check_xcode_license_approved
check_xcode_up_to_date
check_clt_up_to_date
- check_for_other_package_managers
].freeze
end
@@ -136,21 +135,6 @@ def check_if_xcode_needs_clt_installed
EOS
end
- def check_for_other_package_managers
- ponk = MacOS.macports_or_fink
- return if ponk.empty?
-
- <<~EOS
- You have MacPorts or Fink installed:
- #{ponk.join(", ")}
-
- This can cause trouble. You don't have to uninstall them, but you may want to
- temporarily move them out of the way, e.g.
-
- sudo mv /opt/local ~/macports
- EOS
- end
-
def check_ruby_version
ruby_version = "2.3.7"
return if RUBY_VERSION == ruby_version
@@ -200,19 +184,6 @@ def check_xcode_select_path
EOS
end
- def check_for_bad_curl
- return unless MacOS.version <= "10.8"
- return if Formula["curl"].installed?
-
- <<~EOS
- The system curl on 10.8 and below is often incapable of supporting
- modern secure connections & will fail on fetching formulae.
-
- We recommend you:
- brew install curl
- EOS
- end
-
def check_xcode_license_approved
# If the user installs Xcode-only, they have to approve the
# license or no "xc*" tool will work.
@@ -236,18 +207,6 @@ def check_xquartz_up_to_date
EOS
end
- def check_for_beta_xquartz
- return unless MacOS::XQuartz.version.to_s.include?("beta")
-
- <<~EOS
- The following beta release of XQuartz is installed: #{MacOS::XQuartz.version}
-
- XQuartz beta releases include address sanitization, and do not work with
- all software; notably, wine will not work with beta releases of XQuartz.
- We recommend only installing stable releases of XQuartz.
- EOS
- end
-
def check_filesystem_case_sensitive
dirs_to_check = [
HOMEBREW_PREFIX, | true |
Other | Homebrew | brew | c3a46bc57046a11e3f95dffc11ac57842c887f38.json | os/mac/diagnostic: remove some old/unneeded checks. | Library/Homebrew/test/os/mac/diagnostic_spec.rb | @@ -1,12 +1,6 @@
require "diagnostic"
describe Homebrew::Diagnostic::Checks do
- specify "#check_for_other_package_managers" do
- allow(MacOS).to receive(:macports_or_fink).and_return(["fink"])
- expect(subject.check_for_other_package_managers)
- .to match("You have MacPorts or Fink installed:")
- end
-
specify "#check_for_unsupported_macos" do
ENV.delete("HOMEBREW_DEVELOPER")
allow(OS::Mac).to receive(:prerelease?).and_return(true)
@@ -15,13 +9,6 @@
.to match("We do not provide support for this pre-release version.")
end
- specify "#check_for_beta_xquartz" do
- allow(MacOS::XQuartz).to receive(:version).and_return("2.7.10_beta2")
-
- expect(subject.check_for_beta_xquartz)
- .to match("The following beta release of XQuartz is installed: 2.7.10_beta2")
- end
-
specify "#check_if_xcode_needs_clt_installed" do
allow(MacOS).to receive(:version).and_return(OS::Mac::Version.new("10.11"))
allow(MacOS::Xcode).to receive(:installed?).and_return(true) | true |
Other | Homebrew | brew | 699d543ecddeb399c3d1640bad692e48c66be6ad.json | Use Homebrew.default_prefix? in more places. | Library/Homebrew/diagnostic.rb | @@ -802,7 +802,7 @@ def check_for_tap_ruby_files_locations
end
def check_homebrew_prefix
- return if HOMEBREW_PREFIX.to_s == Homebrew::DEFAULT_PREFIX
+ return if Homebrew.default_prefix?
<<~EOS
Your Homebrew's prefix is not #{Homebrew::DEFAULT_PREFIX}. | true |
Other | Homebrew | brew | 699d543ecddeb399c3d1640bad692e48c66be6ad.json | Use Homebrew.default_prefix? in more places. | Library/Homebrew/utils/analytics.rb | @@ -16,7 +16,7 @@ def clear_os_prefix_ci
def os_prefix_ci
@os_prefix_ci ||= begin
os = OS_VERSION
- prefix = ", #{custom_prefix_label}" if HOMEBREW_PREFIX.to_s != Homebrew::DEFAULT_PREFIX
+ prefix = ", #{custom_prefix_label}" if Homebrew.default_prefix?
ci = ", CI" if ENV["CI"]
"#{os}#{prefix}#{ci}"
end | true |
Other | Homebrew | brew | 91ef2babddd81e0f381e39b33a8587690dd65c2f.json | gitignore: ignore pinned taps | .gitignore | @@ -17,6 +17,7 @@
/Library/Homebrew/test/fs_leak_log
/Library/Homebrew/vendor/portable-ruby
/Library/Taps
+/Library/PinnedTaps
# Ignore Bundler files
**/.bundle/bin | false |
Other | Homebrew | brew | ad1acdc1adfe5cc58590069fa604f884e729d89e.json | requirement: fix new RuboCop failures. | Library/Homebrew/requirement.rb | @@ -12,8 +12,8 @@ class Requirement
attr_reader :tags, :name, :cask, :download
def initialize(tags = [])
- @cask ||= self.class.cask
- @download ||= self.class.download
+ @cask = self.class.cask
+ @download = self.class.download
tags.each do |tag|
next unless tag.is_a? Hash
| false |
Other | Homebrew | brew | a24197bcc995781caa14855fecf7f31ac0ac43d8.json | Fix some bottling logic
- We've never supported `devel` bottles so don't bother outputting their
status to `brew info`
- Don't `brew upgrade` or `brew reinstall` bottles if they were
previously built as a bottle unless there's no bottles defined at all
(rather than there was no compatible bottles). Fixes #5532. | Library/Homebrew/cmd/info.rb | @@ -174,9 +174,7 @@ def info_formula(f)
end
if devel = f.devel
- s = "devel #{devel.version}"
- s += " (bottled)" if devel.bottled?
- specs << s
+ specs << "devel #{devel.version}"
end
specs << "HEAD" if f.head | true |
Other | Homebrew | brew | a24197bcc995781caa14855fecf7f31ac0ac43d8.json | Fix some bottling logic
- We've never supported `devel` bottles so don't bother outputting their
status to `brew info`
- Don't `brew upgrade` or `brew reinstall` bottles if they were
previously built as a bottle unless there's no bottles defined at all
(rather than there was no compatible bottles). Fixes #5532. | Library/Homebrew/cmd/upgrade.rb | @@ -147,7 +147,7 @@ def upgrade_formula(f)
fi = FormulaInstaller.new(f)
fi.options = options
- fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && f.build.bottle?)
+ fi.build_bottle = ARGV.build_bottle? || (!f.bottle_defined? && f.build.bottle?)
fi.installed_on_request = !ARGV.named.empty?
fi.link_keg ||= keg_was_linked if keg_had_linked_opt
if tab | true |
Other | Homebrew | brew | a24197bcc995781caa14855fecf7f31ac0ac43d8.json | Fix some bottling logic
- We've never supported `devel` bottles so don't bother outputting their
status to `brew info`
- Don't `brew upgrade` or `brew reinstall` bottles if they were
previously built as a bottle unless there's no bottles defined at all
(rather than there was no compatible bottles). Fixes #5532. | Library/Homebrew/reinstall.rb | @@ -21,7 +21,7 @@ def reinstall_formula(f, build_from_source: false)
fi = FormulaInstaller.new(f)
fi.options = options
fi.invalid_option_names = build_options.invalid_option_names
- fi.build_bottle = ARGV.build_bottle? || (!f.bottled? && f.build.bottle?)
+ fi.build_bottle = ARGV.build_bottle? || (!f.bottle_defined? && f.build.bottle?)
fi.interactive = ARGV.interactive?
fi.git = ARGV.git?
fi.link_keg ||= keg_was_linked if keg_had_linked_opt | true |
Other | Homebrew | brew | e472c35880fc6708be987ecbe768019003b105b6.json | Remove unneeded cleanup. | Library/Homebrew/cask/auditor.rb | @@ -1,4 +1,3 @@
-require "cleanup"
require "cask/download"
module Cask
@@ -52,9 +51,6 @@ def audit_languages(languages)
ohai "Auditing language: #{languages.map { |lang| "'#{lang}'" }.to_sentence}"
MacOS.instance_variable_set(:@languages, languages)
audit_cask_instance(CaskLoader.load(cask.sourcefile_path))
- ensure
- # TODO: Check if this is still needed once cache deduplication is active.
- Homebrew::Cleanup.new(days: 0).cleanup_cask(cask) if audit_download?
end
def audit_cask_instance(cask) | false |
Other | Homebrew | brew | 7d7ad6cb0fd93db1f5dc74fc062525935d45f954.json | bash completions: start auto-completing early | completions/bash/brew | @@ -103,23 +103,51 @@ _brew_analytics() {
_brew_bottle() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp "--merge --rb --write --root_url="
+ -*)
+ __brewcomp "
+ --debug
+ --force-core-tap
+ --help
+ --json
+ --keep-old
+ --merge
+ --no-commit
+ --no-rebuild
+ --or-later
+ --root-url
+ --skip-relocation
+ --verbose
+ --write
+ "
return
;;
esac
__brew_complete_installed
}
_brew_cleanup() {
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ -*)
+ __brewcomp "
+ --debug
+ --dry-run
+ --prune
+ --help
+ --verbose
+ -s
+ "
+ return
+ ;;
+ esac
__brew_complete_installed
}
_brew_create() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp "--autotools --cmake --no-fetch --set-name --set-version"
+ -*)
+ __brewcomp "--autotools --cmake --meson --no-fetch --HEAD --set-name --set-version --tap --force --verbose --debug --help"
return
;;
esac
@@ -128,7 +156,7 @@ _brew_create() {
_brew_deps() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--1 --all --tree"
return
;;
@@ -139,7 +167,7 @@ _brew_deps() {
_brew_desc() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--search --name --description"
return
;;
@@ -150,7 +178,7 @@ _brew_desc() {
_brew_diy() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--set-name --set-version"
return
;;
@@ -166,7 +194,7 @@ _brew_fetch() {
local cur="${COMP_WORDS[COMP_CWORD]}"
local prv="$(__brewcomp_prev)"
case "$cur" in
- --*)
+ -*)
__brewcomp "
--deps --force
--devel --HEAD
@@ -183,7 +211,7 @@ _brew_fetch() {
_brew_gist_logs() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--new-issue"
return
;;
@@ -194,7 +222,7 @@ _brew_gist_logs() {
_brew_info() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--all --github --installed --json=v1"
return
;;
@@ -207,7 +235,7 @@ _brew_install() {
local prv="$(__brewcomp_prev)"
case "$cur" in
- --*)
+ -*)
if __brewcomp_words_include "--interactive"
then
__brewcomp "--devel --git --HEAD"
@@ -234,7 +262,7 @@ _brew_install() {
_brew_irb() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--examples"
return
;;
@@ -244,7 +272,7 @@ _brew_irb() {
_brew_link() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--dry-run --overwrite --force"
return
;;
@@ -257,7 +285,7 @@ _brew_list() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
# most options to brew-list are mutually exclusive
if __brewcomp_words_include "--unbrewed"
then
@@ -298,7 +326,7 @@ _brew_log() {
declare -F _git_log >/dev/null || return
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "
$__git_log_common_options
$__git_log_shortlog_options
@@ -316,7 +344,7 @@ _brew_log() {
_brew_man() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--link --server --verbose"
return
;;
@@ -326,7 +354,7 @@ _brew_man() {
_brew_options() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--all --compact --installed"
return
;;
@@ -337,18 +365,19 @@ _brew_options() {
_brew_outdated() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--quiet --json=v1 --fetch-HEAD"
return
;;
esac
+ __brewcomp_null
}
_brew_postinstall() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp "--debug --sandbox"
+ -*)
+ __brewcomp "--debug --verbose --force --help"
return
;;
esac
@@ -368,18 +397,31 @@ _brew_prune() {
_brew_pull() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp "--bottle --bump --clean --ignore-whitespace --install --resolve"
+ -*)
+ __brewcomp "
+ --bintray-org
+ --bottle
+ --branch-okay
+ --bump
+ --clean
+ --ignore-whitespace
+ --no-pbcopy
+ --no-publish
+ --resolve
+ --test-bot-user
+ --warn-on-publish-failure
+ "
return
;;
esac
+ __brew_complete_formulae
}
_brew_readall() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp " --aliases --syntax"
+ -*)
+ __brewcomp "--aliases --syntax"
return
;;
esac
@@ -389,8 +431,8 @@ _brew_readall() {
_brew_search() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp "--debian --desc --fedora --fink --macports --opensuse --ubuntu"
+ -*)
+ __brewcomp "--casks --debian --desc --fedora --fink --macports --opensuse --ubuntu"
return
;;
esac
@@ -400,8 +442,8 @@ _brew_search() {
_brew_style() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp "--fix"
+ -*)
+ __brewcomp "--fix --display-cop-names --only-cops --except-cops"
return
;;
esac
@@ -419,17 +461,18 @@ _brew_switch() {
_brew_tap() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp "--repair --list-pinned"
+ -*)
+ __brewcomp "--full --force-auto-update --repair --list-pinned"
return
;;
esac
+ __brewcomp_null
}
_brew_tap_info() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--installed --json=v1"
return
;;
@@ -440,7 +483,7 @@ _brew_tap_info() {
_brew_tap_new() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--verbose"
return
;;
@@ -454,7 +497,7 @@ _brew_tap_unpin() {
_brew_tests() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--verbose"
return
;;
@@ -464,7 +507,7 @@ _brew_tests() {
_brew_uninstall() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--force"
return
;;
@@ -475,7 +518,7 @@ _brew_uninstall() {
_brew_unpack() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--git --patch --destdir="
return
;;
@@ -486,7 +529,7 @@ _brew_unpack() {
_brew_update() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
+ -*)
__brewcomp "--rebase --verbose"
return
;;
@@ -498,7 +541,7 @@ _brew_upgrade() {
local prv="$(__brewcomp_prev)"
case "$cur" in
- --*)
+ -*)
__brewcomp "
--all
--build-from-source --build-bottle --force-bottle
@@ -517,8 +560,8 @@ _brew_upgrade() {
_brew_uses() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
- --*)
- __brewcomp "--installed --recursive"
+ -*)
+ __brewcomp "--installed --recursive --include-build --include-test --include-optional --skip-recommended --devel --HEAD"
return
;;
esac | false |
Other | Homebrew | brew | b278165dabcc1416a5633f957dd989af7a8ac6c6.json | Add HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK variable
If set, Homebrew will fail if on the failure of installation from a
bottle rather than falling back to building from source. | Library/Homebrew/formula_installer.rb | @@ -296,7 +296,9 @@ def install
formula.prefix.rmtree if formula.prefix.directory?
formula.rack.rmdir_if_possible
end
- raise if ARGV.homebrew_developer? || e.is_a?(Interrupt)
+ raise if ARGV.homebrew_developer? ||
+ e.is_a?(Interrupt) ||
+ ENV["HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK"]
@pour_failed = true
onoe e.message | true |
Other | Homebrew | brew | b278165dabcc1416a5633f957dd989af7a8ac6c6.json | Add HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK variable
If set, Homebrew will fail if on the failure of installation from a
bottle rather than falling back to building from source. | Library/Homebrew/manpages/brew.1.md.erb | @@ -218,6 +218,10 @@ Note that environment variables must have a value set to be detected. For exampl
If set, Homebrew will not auto-update before running `brew install`,
`brew upgrade` or `brew tap`.
+ * `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK`:
+ If set, Homebrew will fail if on the failure of installation from a bottle
+ rather than falling back to building from source.
+
* `HOMEBREW_NO_COLOR`:
If set, Homebrew will not print text with color added.
| true |
Other | Homebrew | brew | b278165dabcc1416a5633f957dd989af7a8ac6c6.json | Add HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK variable
If set, Homebrew will fail if on the failure of installation from a
bottle rather than falling back to building from source. | docs/Manpage.md | @@ -1211,6 +1211,10 @@ Note that environment variables must have a value set to be detected. For exampl
If set, Homebrew will not auto-update before running `brew install`,
`brew upgrade` or `brew tap`.
+ * `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK`:
+ If set, Homebrew will fail if on the failure of installation from a bottle
+ rather than falling back to building from source.
+
* `HOMEBREW_NO_COLOR`:
If set, Homebrew will not print text with color added.
| true |
Other | Homebrew | brew | b278165dabcc1416a5633f957dd989af7a8ac6c6.json | Add HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK variable
If set, Homebrew will fail if on the failure of installation from a
bottle rather than falling back to building from source. | manpages/brew.1 | @@ -1341,6 +1341,10 @@ If set, Homebrew will not send analytics\. See: \fIhttps://docs\.brew\.sh/Analyt
If set, Homebrew will not auto\-update before running \fBbrew install\fR, \fBbrew upgrade\fR or \fBbrew tap\fR\.
.
.TP
+\fBHOMEBREW_NO_BOTTLE_SOURCE_FALLBACK\fR
+If set, Homebrew will fail if on the failure of installation from a bottle rather than falling back to building from source\.
+.
+.TP
\fBHOMEBREW_NO_COLOR\fR
If set, Homebrew will not print text with color added\.
. | true |
Other | Homebrew | brew | ca29e508f769e24ba5ad417edc253f6c5d7b0c08.json | bash completions: use proper Bash syntax | completions/bash/brew | @@ -13,7 +13,7 @@ __brewcomp_words_include() {
then
return 0
fi
- i="$((++i))"
+ (( i++ ))
done
return 1
}
@@ -24,7 +24,7 @@ __brewcomp_prev() {
local prv="${COMP_WORDS[idx]}"
while [[ "$prv" = -* ]]
do
- idx="$((--idx))"
+ (( idx-- ))
prv="${COMP_WORDS[idx]}"
done
echo "$prv"
@@ -33,7 +33,7 @@ __brewcomp_prev() {
__brewcomp() {
# break $1 on space, tab, and newline characters,
# and turn it into a newline separated list of words
- local list s sep=$'\n' IFS=$' '$'\t'$'\n'
+ local list s sep=$'\n' IFS=$' \t\n'
local cur="${COMP_WORDS[COMP_CWORD]}"
for s in $1
@@ -379,7 +379,7 @@ _brew_readall() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
--*)
- __brewcomp "--syntax"
+ __brewcomp " --aliases --syntax"
return
;;
esac
@@ -532,7 +532,7 @@ __brew_caskcomp_words_include ()
if [[ "${COMP_WORDS[i]}" = "$1" ]]; then
return 0
fi
- i=$((++i))
+ (( i++ ))
done
return 1
}
@@ -543,7 +543,7 @@ __brew_caskcomp_prev ()
local idx=$((COMP_CWORD - 1))
local prv="${COMP_WORDS[idx]}"
while [[ $prv == -* ]]; do
- idx=$((--idx))
+ (( idx-- ))
prv="${COMP_WORDS[idx]}"
done
echo "$prv"
@@ -553,15 +553,15 @@ __brew_caskcomp ()
{
# break $1 on space, tab, and newline characters,
# and turn it into a newline separated list of words
- local list s sep=$'\n' IFS=$' '$'\t'$'\n'
+ local list s sep=$'\n' IFS=$' \t\n'
local cur="${COMP_WORDS[COMP_CWORD]}"
for s in $1; do
__brew_caskcomp_words_include "$s" && continue
list="$list$s$sep"
done
- IFS=$sep
+ IFS="$sep"
COMPREPLY=($(compgen -W "$list" -- "$cur"))
}
@@ -708,7 +708,7 @@ _brew_cask ()
break
;;
esac
- i=$((++i))
+ (( i++ ))
done
if [[ $i -eq $COMP_CWORD ]]; then
@@ -759,15 +759,15 @@ _brew() {
break
;;
esac
- i="$((++i))"
+ (( i++ ))
done
if [[ "$i" -eq "$COMP_CWORD" ]]
then
# Do not auto-complete "*instal" or "*uninstal" aliases for "*install" commands.
# Prefix newline to prevent not checking the first command.
local cmds=$'\n'"$(brew commands --quiet --include-aliases | \grep -v instal$)"
- __brewcomp "${cmds}"
+ __brewcomp "$cmds"
return
fi
| false |
Other | Homebrew | brew | ea0fca9511222976047f444ea8038d104b921632.json | cleanup: make cache directory for clean file.
This means the `.cleaned` file is correctly created for periodic
cleanup handling. | Library/Homebrew/cleanup.rb | @@ -194,6 +194,7 @@ def clean!
cleanup_old_cache_db
rm_ds_store
prune_prefix_symlinks_and_directories
+ HOMEBREW_CACHE.mkpath
FileUtils.touch PERIODIC_CLEAN_FILE
else
args.each do |arg| | false |
Other | Homebrew | brew | 92cb62dace2d4e9480b2e9cac27239798dc89d95.json | utils: fix bad parameters. | Library/Homebrew/utils.rb | @@ -230,7 +230,7 @@ def install_gem!(name)
# having to find the right `gem` binary for the running Ruby interpreter.
require "rubygems/commands/install_command"
install_cmd = Gem::Commands::InstallCommand.new
- install_cmd.handle_options("--no-document", name)
+ install_cmd.handle_options(["--no-document", name])
exit_code = 1 # Should not matter as `install_cmd.execute` always throws.
begin
install_cmd.execute | false |
Other | Homebrew | brew | e63eff22014d1a8ede20312f715fe062702abe2c.json | Treat future SDKs as "latest"
Some SDKs return a number higher than the hard-coded `latest_version`
in this file. With the current `==` check, those higher version numbers
are treated as "not the latest". This prevents machines with
higher-versioned SDKs from being able to use Homebrew.
To resolve that problem, this PR changes the check to `>=`, which allows
machines with higher-versioned SDKs to also use Homebrew to install
packages. | Library/Homebrew/os/mac/xcode.rb | @@ -44,7 +44,7 @@ def below_minimum_version?
end
def latest_sdk_version?
- OS::Mac.version == OS::Mac.latest_sdk_version
+ OS::Mac.version >= OS::Mac.latest_sdk_version
end
def needs_clt_installed? | false |
Other | Homebrew | brew | b917cccf195abd365185d867c0db1cf578b85990.json | rubocops: remove scons audit.
This will be deprecated in #5477. | Library/Homebrew/rubocops/text.rb | @@ -42,10 +42,6 @@ def audit_formula(_node, _class_node, _parent_class_node, body_node)
problem %q(use "xcodebuild *args" instead of "system 'xcodebuild', *args")
end
- find_method_with_args(body_node, :system, "scons") do
- problem "use \"scons *args\" instead of \"system 'scons', *args\""
- end
-
find_method_with_args(body_node, :system, "go", "get") do
problem "Do not use `go get`. Please ask upstream to implement Go vendoring"
end | true |
Other | Homebrew | brew | b917cccf195abd365185d867c0db1cf578b85990.json | rubocops: remove scons audit.
This will be deprecated in #5477. | Library/Homebrew/test/rubocops/text_spec.rb | @@ -86,20 +86,6 @@ def install
RUBY
end
- it "When scons is executed" do
- expect_offense(<<~RUBY)
- class Foo < Formula
- url "https://brew.sh/foo-1.0.tgz"
- homepage "https://brew.sh"
-
- def install
- system "scons", "foo", "bar"
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ use \"scons *args\" instead of \"system 'scons', *args\"
- end
- end
- RUBY
- end
-
it "When plist_options are not defined when using a formula-defined plist", :ruby23 do
expect_offense(<<~RUBY)
class Foo < Formula | true |
Other | Homebrew | brew | d5b2415c870e010a4283d5b5d0b5166514493636.json | info: Fix style: Use a guard clause
Fix the style error:
Library/Homebrew/cmd/info.rb:88:7: C:
Use a guard clause instead of wrapping the code inside a conditional expression. | Library/Homebrew/cmd/info.rb | @@ -85,11 +85,8 @@ def info_args
def info
info_args.parse
if args.json
- if args.json == "v1" || args.json == true
- print_json
- else
- raise UsageError, "invalid JSON version: #{args.json}"
- end
+ raise UsageError, "invalid JSON version: #{args.json}" unless ["v1", true].include? args.json
+ print_json
elsif args.github?
exec_browser(*ARGV.formulae.map { |f| github_info(f) })
else | false |
Other | Homebrew | brew | 5b7404a0d2a1168267b7e69aecc4c51fe4b80852.json | Install Bundler <2.
Newer versions require the systems RubyGems to be updated. | Library/Homebrew/dev-cmd/tests.rb | @@ -86,7 +86,7 @@ def tests
ENV["GIT_#{role}_DATE"] = "Sun Jan 22 19:59:13 2017 +0000"
end
- Homebrew.install_gem_setup_path! "bundler"
+ Homebrew.install_gem_setup_path! "bundler", "<2"
system "bundle", "install" unless quiet_system("bundle", "check")
parallel = true | true |
Other | Homebrew | brew | 5b7404a0d2a1168267b7e69aecc4c51fe4b80852.json | Install Bundler <2.
Newer versions require the systems RubyGems to be updated. | Library/Homebrew/dev-cmd/vendor-gems.rb | @@ -17,7 +17,7 @@ def vendor_gems
switch :debug
end.parse
- Homebrew.install_gem_setup_path! "bundler"
+ Homebrew.install_gem_setup_path! "bundler", "<2"
ohai "cd #{HOMEBREW_LIBRARY_PATH}/vendor"
(HOMEBREW_LIBRARY_PATH/"vendor").cd do | true |
Other | Homebrew | brew | 265ab264fde4d07f391d7332514502870d2888b4.json | ErrorDuringExecution: Fix wrong number of arguments
Error: wrong number of arguments (given 1, expected 2)
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/exceptions.rb:548:in `block in initialize'
/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/exceptions.rb:557:in `map' | Library/Homebrew/exceptions.rb | @@ -539,7 +539,8 @@ def initialize(cmd, status:, output: nil)
s = "Failure while executing; `#{cmd.shelljoin.gsub(/\\=/, "=")}` exited with #{exitstatus}."
unless [*output].empty?
- format_output_line = lambda do |type, line|
+ format_output_line = lambda do |type_line|
+ type, line = *type_line
if type == :stderr
Formatter.error(line)
else | false |
Other | Homebrew | brew | 03597404af1d0082ce01d703d69d710209d5155d.json | os: add version info for kernel and glibc [Linux] | Library/Homebrew/os/linux/glibc.rb | @@ -11,6 +11,14 @@ def system_version
@system_version = Version.new version
end
+
+ def minimum_version
+ Version.new "2.12"
+ end
+
+ def below_minimum_version?
+ system_version < minimum_version
+ end
end
end
end | true |
Other | Homebrew | brew | 03597404af1d0082ce01d703d69d710209d5155d.json | os: add version info for kernel and glibc [Linux] | Library/Homebrew/os/linux/kernel.rb | @@ -0,0 +1,24 @@
+module OS
+ module Linux
+ module Kernel
+ module_function
+
+ def version
+ return @version if @version
+
+ version = Utils.popen_read("uname", "-r").chomp
+ return Version::NULL unless version
+
+ @version = Version.new version
+ end
+
+ def minimum_version
+ Version.new "2.6.32"
+ end
+
+ def below_minimum_version?
+ version < minimum_version
+ end
+ end
+ end
+end | true |
Other | Homebrew | brew | c32283e5be444565bda707f8cb93bad1d15296c2.json | diagnostic: use universal pull request message | Library/Homebrew/diagnostic.rb | @@ -95,6 +95,16 @@ def build_error_checks
]).freeze
end
+ def please_create_pull_requests(what = "unsupported configuration")
+ <<~EOS
+ You may encounter build failures and other breakages.
+ Please create pull requests instead of asking for help on
+ Homebrew's GitHub, Discourse, Twitter or IRC. You are
+ responsible for resolving any issues you experience, as
+ you are running this #{what}.
+ EOS
+ end
+
def check_for_installed_developer_tools
return if DevelopmentTools.installed?
| true |
Other | Homebrew | brew | c32283e5be444565bda707f8cb93bad1d15296c2.json | diagnostic: use universal pull request message | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -60,10 +60,7 @@ def check_for_unsupported_macos
<<~EOS
You are using macOS #{MacOS.version}.
#{who} do not provide support for this #{what}.
- You will encounter build failures and other breakages.
- Please create pull requests instead of asking for help on Homebrew's
- GitHub, Discourse, Twitter or IRC. As you are running this #{what},
- you are responsible for resolving any issues you experience.
+ #{please_create_pull_requests(what)}
EOS
end
| true |
Other | Homebrew | brew | 2181ea76c6d48c10974fa9d36cf01c014dd42475.json | python_virtualenv_constants: upgrade virtualenv to 16.2.0 | Library/Homebrew/language/python_virtualenv_constants.rb | @@ -1,6 +1,4 @@
PYTHON_VIRTUALENV_URL =
- "https://files.pythonhosted.org/packages/4e/8b" \
- "/75469c270ac544265f0020aa7c4ea925c5284b23e445cf3aa8b99f662690" \
- "/virtualenv-16.1.0.tar.gz".freeze
+ "https://github.com/pypa/virtualenv/archive/16.2.0.tar.gz".freeze
PYTHON_VIRTUALENV_SHA256 =
- "f899fafcd92e1150f40c8215328be38ff24b519cd95357fa6e78e006c7638208".freeze
+ "448def1220df9960e6d18fb5424107ffb1249eb566a5a311257860ab6b52b3fd".freeze | false |
Other | Homebrew | brew | ede46717523d8c0a9839758e4857c7e4b92d0eb5.json | README: remove coverage badge.
Coveralls works fine for PRs but is a bit too flaky for the master branch. | README.md | @@ -20,7 +20,6 @@ Second, read the [Troubleshooting Checklist](https://docs.brew.sh/Troubleshootin
## Contributing
[](https://dev.azure.com/Homebrew/Homebrew/_build/latest?definitionId=1)
-[](https://codecov.io/gh/Homebrew/brew)
We'd love you to contribute to Homebrew. First, please read our [Contribution Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md#code-of-conduct).
| false |
Other | Homebrew | brew | 61fa59e95bbcfc0585d93788af379ff2eae8594e.json | Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.
Also, migrate `brew tap-new` to use Azure pipelines. | Library/Homebrew/dev-cmd/tap-new.rb | @@ -51,30 +51,23 @@ def tap_new
MARKDOWN
write_path(tap, "README.md", readme)
- travis = <<~YAML
- language: c
- os: osx
- compiler: clang
- osx_image: xcode9.2
- cache:
- directories:
- - #{Homebrew::DEFAULT_PREFIX}/Homebrew/Library/Homebrew/vendor/bundle
- branches:
- only:
- - master
-
- before_install:
- - sudo chown -R "$USER" "$(brew --repo)"
- - travis_retry brew update
- - HOMEBREW_TAP_DIR="$(brew --repo "$TRAVIS_REPO_SLUG")"
- - mkdir -p "$HOMEBREW_TAP_DIR"
- - rm -rf "$HOMEBREW_TAP_DIR"
- - ln -s "$PWD" "$HOMEBREW_TAP_DIR"
-
- script:
- - brew test-bot
+ azure = <<~YAML
+ jobs:
+ - job: macOS
+ pool:
+ vmImage: xcode9-macos10.13
+ steps:
+ - bash: |
+ sudo xcode-select --switch /Applications/Xcode_10.app/Contents/Developer
+ brew update
+ HOMEBREW_TAP_DIR="/usr/local/Homebrew/Library/Taps/#{tap}"
+ mkdir -p "$HOMEBREW_TAP_DIR"
+ rm -rf "$HOMEBREW_TAP_DIR"
+ ln -s "$PWD" "$HOMEBREW_TAP_DIR"
+ brew test-bot
+ displayName: Run brew test-bot
YAML
- write_path(tap, ".travis.yml", travis)
+ write_path(tap, "azure-pipelines.yml", azure)
end
def write_path(tap, filename, content) | true |
Other | Homebrew | brew | 61fa59e95bbcfc0585d93788af379ff2eae8594e.json | Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.
Also, migrate `brew tap-new` to use Azure pipelines. | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -74,7 +74,7 @@ def check_xcode_up_to_date
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
# repository. This only needs to support whatever CI providers
# Homebrew/brew is currently using.
- return if ENV["HOMEBREW_TRAVIS_CI"] || ENV["HOMEBREW_AZURE_PIPELINES"]
+ return if ENV["HOMEBREW_AZURE_PIPELINES"]
message = <<~EOS
Your Xcode (#{MacOS::Xcode.version}) is outdated.
@@ -101,7 +101,7 @@ def check_clt_up_to_date
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
# repository. This only needs to support whatever CI providers
# Homebrew/brew is currently using.
- return if ENV["HOMEBREW_TRAVIS_CI"] || ENV["HOMEBREW_AZURE_PIPELINES"]
+ return if ENV["HOMEBREW_AZURE_PIPELINES"]
<<~EOS
A newer Command Line Tools release is available. | true |
Other | Homebrew | brew | 61fa59e95bbcfc0585d93788af379ff2eae8594e.json | Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.
Also, migrate `brew tap-new` to use Azure pipelines. | Library/Homebrew/formula_installer.rb | @@ -741,10 +741,6 @@ def build
].concat(build_argv)
Utils.safe_fork do
- # Invalidate the current sudo timestamp in case a build script calls sudo.
- # Travis CI's Linux sudoless workers have a weird sudo that fails here.
- system "/usr/bin/sudo", "-k" if ENV["HOMEBREW_TRAVIS_SUDO"] != "false"
-
if Sandbox.formula?(formula)
sandbox = Sandbox.new
formula.logs.mkpath | true |
Other | Homebrew | brew | 61fa59e95bbcfc0585d93788af379ff2eae8594e.json | Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.
Also, migrate `brew tap-new` to use Azure pipelines. | Library/Homebrew/test/spec_helper.rb | @@ -2,7 +2,7 @@
require "simplecov"
formatters = [SimpleCov::Formatter::HTMLFormatter]
- if ENV["HOMEBREW_COVERALLS_REPO_TOKEN"] || ENV["HOMEBREW_TRAVIS_CI"]
+ if ENV["HOMEBREW_COVERALLS_REPO_TOKEN"]
require "coveralls"
if !ENV["HOMEBREW_COLOR"] && (ENV["HOMEBREW_NO_COLOR"] || !$stdout.tty?) | true |
Other | Homebrew | brew | 61fa59e95bbcfc0585d93788af379ff2eae8594e.json | Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.
Also, migrate `brew tap-new` to use Azure pipelines. | Library/Homebrew/utils/curl.rb | @@ -32,7 +32,7 @@ def curl_args(*extra_args, show_output: false, user_agent: :default)
args << "--fail"
args << "--progress-bar" unless ARGV.verbose?
args << "--verbose" if ENV["HOMEBREW_CURL_VERBOSE"]
- args << "--silent" if !$stdout.tty? || ENV["HOMEBREW_TRAVIS_CI"]
+ args << "--silent" unless $stdout.tty?
end
args + extra_args | true |
Other | Homebrew | brew | 61fa59e95bbcfc0585d93788af379ff2eae8594e.json | Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.
Also, migrate `brew tap-new` to use Azure pipelines. | bin/brew | @@ -72,7 +72,7 @@ then
FILTERED_ENV=()
# Filter all but the specific variables.
- for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS LOGNAME USER CI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \
+ for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS LOGNAME USER CI SSH_AUTH_SOCK SUDO_ASKPASS \
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
"${!HOMEBREW_@}" "${!TRAVIS_@}"
do | true |
Other | Homebrew | brew | 0de21812a73b5bbd54e59e9d4b94cfbe50be1f69.json | Use Coveralls for coverage reporting. | .gitignore | @@ -119,9 +119,8 @@
/docs/.jekyll-metadata
# Unignore our root-level metadata files.
+!/.editorconfig
!/.gitignore
-!/.travis.yml
-!/.codecov.yml
!/.yardopts
!/CHANGELOG.md
!/CODE_OF_CONDUCT.md | true |
Other | Homebrew | brew | 0de21812a73b5bbd54e59e9d4b94cfbe50be1f69.json | Use Coveralls for coverage reporting. | .travis.yml | @@ -1,33 +0,0 @@
-language: ruby
-rvm: system
-os: osx
-osx_image: xcode10
-
-cache:
- directories:
- - $HOME/Library/Caches/Homebrew/style
- - $HOME/Library/Caches/Homebrew/tests
- - Library/Homebrew/vendor/bundle
-
-branches:
- only:
- - master
-
-env:
- - HOMEBREW_FORCE_HOMEBREW_ON_LINUX=1
-
-before_install:
- - HOMEBREW_REPOSITORY="$(brew --repo)"
- - sudo chown -R "$USER" "$HOMEBREW_REPOSITORY"
- # trigger vendored ruby installation
- - brew help
- - mv "$HOMEBREW_REPOSITORY/Library/Taps" "$PWD/Library"
- - sudo rm -rf "$HOMEBREW_REPOSITORY"
- - sudo ln -s "$PWD" "$HOMEBREW_REPOSITORY"
- - travis_retry git clone --depth=1 https://github.com/Homebrew/homebrew-test-bot Library/Taps/homebrew/homebrew-test-bot
-
-script:
- - travis_wait 60 brew test-bot
-
-notifications:
- slack: machomebrew:1XNF7p1JRCdBUuKaeSwsWEc1 | true |
Other | Homebrew | brew | 0de21812a73b5bbd54e59e9d4b94cfbe50be1f69.json | Use Coveralls for coverage reporting. | Library/Homebrew/test/.codecov.yml | @@ -1,10 +0,0 @@
-comment: off
-fixes:
- - "::Library/Homebrew/"
-coverage:
- round: nearest
- precision: 2
- status:
- project:
- default:
- threshold: 0.05% | true |
Other | Homebrew | brew | 0de21812a73b5bbd54e59e9d4b94cfbe50be1f69.json | Use Coveralls for coverage reporting. | Library/Homebrew/test/Gemfile | @@ -12,7 +12,7 @@ group :development do
end
group :coverage do
- gem "codecov", require: false
+ gem "coveralls", require: false
gem "simplecov", require: false
gem "simplecov-cobertura", require: false
end | true |
Other | Homebrew | brew | 0de21812a73b5bbd54e59e9d4b94cfbe50be1f69.json | Use Coveralls for coverage reporting. | Library/Homebrew/test/Gemfile.lock | @@ -2,10 +2,12 @@ GEM
remote: https://rubygems.org/
specs:
ast (2.4.0)
- codecov (0.1.14)
- json
- simplecov
- url
+ coveralls (0.8.22)
+ json (>= 1.8, < 3)
+ simplecov (~> 0.16.1)
+ term-ansicolor (~> 1.3)
+ thor (~> 0.19.4)
+ tins (~> 1.6)
diff-lcs (1.3)
docile (1.3.1)
hpricot (0.8.6)
@@ -60,14 +62,17 @@ GEM
simplecov-cobertura (1.3.0)
simplecov (~> 0.8)
simplecov-html (0.10.2)
+ term-ansicolor (1.7.0)
+ tins (~> 1.0)
+ thor (0.19.4)
+ tins (1.20.2)
unicode-display_width (1.4.1)
- url (0.3.2)
PLATFORMS
ruby
DEPENDENCIES
- codecov
+ coveralls
parallel_tests
ronn
rspec | true |
Other | Homebrew | brew | 0de21812a73b5bbd54e59e9d4b94cfbe50be1f69.json | Use Coveralls for coverage reporting. | Library/Homebrew/test/spec_helper.rb | @@ -2,10 +2,22 @@
require "simplecov"
formatters = [SimpleCov::Formatter::HTMLFormatter]
- if ENV["HOMEBREW_CODECOV_TOKEN"] || ENV["HOMEBREW_TRAVIS_CI"]
- require "codecov"
- formatters << SimpleCov::Formatter::Codecov
- ENV["CODECOV_TOKEN"] = ENV["HOMEBREW_CODECOV_TOKEN"]
+ if ENV["HOMEBREW_COVERALLS_REPO_TOKEN"] || ENV["HOMEBREW_TRAVIS_CI"]
+ require "coveralls"
+
+ if !ENV["HOMEBREW_COLOR"] && (ENV["HOMEBREW_NO_COLOR"] || !$stdout.tty?)
+ Coveralls::Output.no_color
+ end
+
+ formatters << Coveralls::SimpleCov::Formatter
+
+ ENV["CI_NAME"] = ENV["HOMEBREW_CI_NAME"]
+ ENV["CI_JOB_ID"] = ENV["TEST_ENV_NUMBER"] || "1"
+ ENV["CI_BUILD_NUMBER"] = ENV["HOMEBREW_CI_BUILD_NUMBER"]
+ ENV["CI_BUILD_URL"] = ENV["HOMEBREW_CI_BUILD_URL"]
+ ENV["CI_BRANCH"] = ENV["HOMEBREW_CI_BRANCH"]
+ ENV["CI_PULL_REQUEST"] = ENV["HOMEBREW_CI_PULL_REQUEST"]
+ ENV["COVERALLS_REPO_TOKEN"] = ENV["HOMEBREW_COVERALLS_REPO_TOKEN"]
end
if ENV["HOMEBREW_AZURE_PIPELINES"] | true |
Other | Homebrew | brew | 0de21812a73b5bbd54e59e9d4b94cfbe50be1f69.json | Use Coveralls for coverage reporting. | azure-pipelines.yml | @@ -10,10 +10,11 @@ jobs:
sudo rm -rf "$HOMEBREW_REPOSITORY"
sudo ln -s "$PWD" "$HOMEBREW_REPOSITORY"
brew update-reset Library/Taps/homebrew/homebrew-core
- brew test-bot --coverage
+ brew test-bot
displayName: Run brew test-bot
env:
HOMEBREW_GITHUB_API_TOKEN: $(github.publicApiToken)
+ HOMEBREW_COVERALLS_REPO_TOKEN: $(coveralls.homebrewBrewApiToken)
- task: PublishTestResults@2
displayName: Publish test-bot test results | true |
Other | Homebrew | brew | 00dbb221b7c125073957ca51d2341adc11f6aafc.json | brew.sh: make update --preinstall exec.
This means that any new environment variables or changes to `bin/brew`
or `brew.sh` will be used in the new process. This also allows the
removal of various fallbacks from autoupdates from old versions. | Library/Homebrew/brew.sh | @@ -395,12 +395,15 @@ update-preinstall-timer() {
update-preinstall() {
[[ -z "$HOMEBREW_HELP" ]] || return
[[ -z "$HOMEBREW_NO_AUTO_UPDATE" ]] || return
+ [[ -z "$HOMEBREW_AUTO_UPDATING" ]] || return
[[ -z "$HOMEBREW_AUTO_UPDATE_CHECKED" ]] || return
[[ -z "$HOMEBREW_UPDATE_PREINSTALL" ]] || return
if [[ "$HOMEBREW_COMMAND" = "install" || "$HOMEBREW_COMMAND" = "upgrade" || "$HOMEBREW_COMMAND" = "tap" ||
"$HOMEBREW_CASK_COMMAND" = "install" || "$HOMEBREW_CASK_COMMAND" = "upgrade" ]]
then
+ export HOMEBREW_AUTO_UPDATING="1"
+
if [[ -z "$HOMEBREW_VERBOSE" ]]
then
update-preinstall-timer &
@@ -417,17 +420,14 @@ update-preinstall() {
kill "$timer_pid" 2>/dev/null
wait "$timer_pid" 2>/dev/null
fi
- fi
- # If brew update --preinstall did a migration then export the new locations.
- if [[ "$HOMEBREW_REPOSITORY" = "/usr/local" &&
- ! -d "$HOMEBREW_REPOSITORY/.git" &&
- -d "/usr/local/Homebrew/.git" ]]
- then
- HOMEBREW_REPOSITORY="/usr/local/Homebrew"
- HOMEBREW_LIBRARY="$HOMEBREW_REPOSITORY/Library"
- export HOMEBREW_REPOSITORY
- export HOMEBREW_LIBRARY
+ unset HOMEBREW_AUTO_UPDATING
+
+ # If we've checked for updates, we don't need to check again.
+ export HOMEBREW_AUTO_UPDATE_CHECKED="1"
+
+ # exec a new process to set any new environment variables.
+ exec "$HOMEBREW_BREW_FILE" "$@"
fi
# If we've checked for updates, we don't need to check again.
@@ -444,7 +444,7 @@ then
# Don't need shellcheck to follow this `source`.
# shellcheck disable=SC1090
source "$HOMEBREW_BASH_COMMAND"
- { update-preinstall; "homebrew-$HOMEBREW_COMMAND" "$@"; exit $?; }
+ { update-preinstall "$@"; "homebrew-$HOMEBREW_COMMAND" "$@"; exit $?; }
else
# Don't need shellcheck to follow this `source`.
# shellcheck disable=SC1090
@@ -453,5 +453,5 @@ else
# Unshift command back into argument list (unless argument list was empty).
[[ "$HOMEBREW_ARG_COUNT" -gt 0 ]] && set -- "$HOMEBREW_COMMAND" "$@"
- { update-preinstall; exec "$HOMEBREW_RUBY_PATH" $HOMEBREW_RUBY_WARNINGS "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; }
+ { update-preinstall "$@"; exec "$HOMEBREW_RUBY_PATH" $HOMEBREW_RUBY_WARNINGS "$HOMEBREW_LIBRARY/Homebrew/brew.rb" "$@"; }
fi | true |
Other | Homebrew | brew | 00dbb221b7c125073957ca51d2341adc11f6aafc.json | brew.sh: make update --preinstall exec.
This means that any new environment variables or changes to `bin/brew`
or `brew.sh` will be used in the new process. This also allows the
removal of various fallbacks from autoupdates from old versions. | Library/Homebrew/config.rb | @@ -36,13 +36,11 @@
HOMEBREW_CACHE_FORMULA = HOMEBREW_CACHE/"Formula"
# Where build, postinstall, and test logs of formulae are written to
-HOMEBREW_LOGS = Pathname.new(ENV["HOMEBREW_LOGS"] || "~/Library/Logs/Homebrew/").expand_path
+HOMEBREW_LOGS = Pathname.new(ENV["HOMEBREW_LOGS"]).expand_path
# Must use `/tmp` instead of `TMPDIR` because long paths break Unix domain sockets
HOMEBREW_TEMP = begin
- # /tmp fallback is here for people auto-updating from a version where
- # HOMEBREW_TEMP isn't set.
- tmp = Pathname.new(ENV["HOMEBREW_TEMP"] || "/tmp")
+ tmp = Pathname.new(ENV["HOMEBREW_TEMP"])
tmp.mkpath unless tmp.exist?
tmp.realpath
end | true |
Other | Homebrew | brew | 00dbb221b7c125073957ca51d2341adc11f6aafc.json | brew.sh: make update --preinstall exec.
This means that any new environment variables or changes to `bin/brew`
or `brew.sh` will be used in the new process. This also allows the
removal of various fallbacks from autoupdates from old versions. | Library/Homebrew/global.rb | @@ -50,18 +50,8 @@
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 " \
"(KHTML, like Gecko) Version/10.0.3 Safari/602.4.8".freeze
-# Bintray fallback is here for people auto-updating from a version where
-# `HOMEBREW_BOTTLE_DEFAULT_DOMAIN` isn't set.
-HOMEBREW_BOTTLE_DEFAULT_DOMAIN = if ENV["HOMEBREW_BOTTLE_DEFAULT_DOMAIN"]
- ENV["HOMEBREW_BOTTLE_DEFAULT_DOMAIN"]
-elsif OS.mac? || ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"]
- "https://homebrew.bintray.com".freeze
-else
- "https://linuxbrew.bintray.com".freeze
-end
-
-HOMEBREW_BOTTLE_DOMAIN = ENV["HOMEBREW_BOTTLE_DOMAIN"] ||
- HOMEBREW_BOTTLE_DEFAULT_DOMAIN
+HOMEBREW_BOTTLE_DEFAULT_DOMAIN = ENV["HOMEBREW_BOTTLE_DEFAULT_DOMAIN"]
+HOMEBREW_BOTTLE_DOMAIN = ENV["HOMEBREW_BOTTLE_DOMAIN"]
require "fileutils"
require "os" | true |
Other | Homebrew | brew | 801e2b5d888e8ec052d415d0fa06d2bc4ad8ec49.json | azure-pipelines: move repository to default prefix
We can't just link it to the right place since bin/brew calls pwd -P. | azure-pipelines.yml | @@ -35,7 +35,11 @@ jobs:
vmImage: ubuntu-16.04
steps:
- bash: |
- "$PWD/bin/brew" test-bot
+ HOMEBREW_REPOSITORY=/home/linuxbrew/.linuxbrew
+ sudo mkdir -p /home/linuxbrew
+ sudo mv "$PWD" "$HOMEBREW_REPOSITORY"
+ sudo ln -s "$HOMEBREW_REPOSITORY" "$PWD"
+ "$HOMEBREW_REPOSITORY/bin/brew" test-bot
displayName: Run brew test-bot
env:
HOMEBREW_GITHUB_API_TOKEN: $(github.publicApiToken) | false |
Other | Homebrew | brew | b7d84f2d9e6b0c44c712dab7987ee3244f80062a.json | build: Propagate entire ErrorDuringExecution
Fixes https://github.com/Homebrew/brew/issues/5427. | Library/Homebrew/build.rb | @@ -202,6 +202,10 @@ def fixopt(f)
error_hash["cmd"] = e.cmd
error_hash["args"] = e.args
error_hash["env"] = e.env
+ elsif error_hash["json_class"] = "ErrorDuringExecution"
+ error_hash["cmd"] = e.cmd
+ error_hash["status"] = e.status.exitstatus
+ error_hash["output"] = e.output
end
error_pipe.puts error_hash.to_json | true |
Other | Homebrew | brew | b7d84f2d9e6b0c44c712dab7987ee3244f80062a.json | build: Propagate entire ErrorDuringExecution
Fixes https://github.com/Homebrew/brew/issues/5427. | Library/Homebrew/utils.rb | @@ -300,7 +300,7 @@ def with_custom_locale(locale)
def safe_system(cmd, *args, **options)
return if Homebrew.system(cmd, *args, **options)
- raise(ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS))
+ raise ErrorDuringExecution.new([cmd, *args], status: $CHILD_STATUS)
end
# Prints no output | true |
Other | Homebrew | brew | f15487380d49b89fd29ab993f9b3c7fd26ba2c2f.json | README: add igas, claui surname. | README.md | @@ -40,11 +40,11 @@ Homebrew's lead maintainer is [Mike McQuaid](https://github.com/mikemcquaid).
Homebrew's project leadership committee is [Mike McQuaid](https://github.com/mikemcquaid), [Misty De Meo](https://github.com/mistydemeo) and [Markus Reiter](https://github.com/reitermarkus).
-Homebrew/brew's other current maintainers are [Claudia](https://github.com/claui), [Michka Popoff](https://github.com/imichka), [Shaun Jackman](https://github.com/sjackman), [Chongyu Zhu](https://github.com/lembacon), [Vitor Galvao](https://github.com/vitorgalvao), [Misty De Meo](https://github.com/mistydemeo), [Gautham Goli](https://github.com/GauthamGoli), [Markus Reiter](https://github.com/reitermarkus), [Steven Peters](https://github.com/scpeters), [Jonathan Chang](https://github.com/jonchang) and [William Woodruff](https://github.com/woodruffw).
+Homebrew/brew's other current maintainers are [Claudia Pellegrino](https://github.com/claui), [Michka Popoff](https://github.com/imichka), [Shaun Jackman](https://github.com/sjackman), [Chongyu Zhu](https://github.com/lembacon), [Vitor Galvao](https://github.com/vitorgalvao), [Misty De Meo](https://github.com/mistydemeo), [Gautham Goli](https://github.com/GauthamGoli), [Markus Reiter](https://github.com/reitermarkus), [Steven Peters](https://github.com/scpeters), [Jonathan Chang](https://github.com/jonchang) and [William Woodruff](https://github.com/woodruffw).
Homebrew/brew's Linux support (and Linuxbrew) maintainers are [Michka Popoff](https://github.com/imichka) and [Shaun Jackman](https://github.com/sjackman).
-Homebrew/homebrew-core's other current maintainers are [Claudia](https://github.com/claui), [Michka Popoff](https://github.com/imichka), [Shaun Jackman](https://github.com/sjackman), [Chongyu Zhu](https://github.com/lembacon), [Izaak Beekman](https://github.com/zbeekman), [Sean Molenaar](https://github.com/SMillerDev), [Jan Viljanen](https://github.com/javian), [Jason Tedor](https://github.com/jasontedor), [Viktor Szakats](https://github.com/vszakats), [FX Coudert](https://github.com/fxcoudert), [Thierry Moisan](https://github.com/moisan), [Steven Peters](https://github.com/scpeters), [Misty De Meo](https://github.com/mistydemeo) and [Tom Schoonjans](https://github.com/tschoonj).
+Homebrew/homebrew-core's other current maintainers are [Claudia Pellegrino](https://github.com/claui), [Igor Kapkov](https://github.com/igas), [Michka Popoff](https://github.com/imichka), [Shaun Jackman](https://github.com/sjackman), [Chongyu Zhu](https://github.com/lembacon), [Izaak Beekman](https://github.com/zbeekman), [Sean Molenaar](https://github.com/SMillerDev), [Jan Viljanen](https://github.com/javian), [Jason Tedor](https://github.com/jasontedor), [Viktor Szakats](https://github.com/vszakats), [FX Coudert](https://github.com/fxcoudert), [Thierry Moisan](https://github.com/moisan), [Steven Peters](https://github.com/scpeters), [Misty De Meo](https://github.com/mistydemeo) and [Tom Schoonjans](https://github.com/tschoonj).
Former maintainers with significant contributions include [JCount](https://github.com/jcount), [commitay](https://github.com/commitay), [Dominyk Tiller](https://github.com/DomT4), [Tim Smith](https://github.com/tdsmith), [Baptiste Fontaine](https://github.com/bfontaine), [Xu Cheng](https://github.com/xu-cheng), [Martin Afanasjew](https://github.com/UniqMartin), [Brett Koonce](https://github.com/asparagui), [Charlie Sharpsteen](https://github.com/Sharpie), [Jack Nagel](https://github.com/jacknagel), [Adam Vandenberg](https://github.com/adamv), [Andrew Janke](https://github.com/apjanke), [Alex Dunn](https://github.com/dunn), [neutric](https://github.com/neutric), [Tomasz Pajor](https://github.com/nijikon), [Uladzislau Shablinski](https://github.com/vladshablinsky), [Alyssa Ross](https://github.com/alyssais), [ilovezfs](https://github.com/ilovezfs) and Homebrew's creator: [Max Howell](https://github.com/mxcl).
| true |
Other | Homebrew | brew | f15487380d49b89fd29ab993f9b3c7fd26ba2c2f.json | README: add igas, claui surname. | docs/Manpage.md | @@ -1313,11 +1313,11 @@ Homebrew's lead maintainer is Mike McQuaid.
Homebrew's project leadership committee is Mike McQuaid, Misty De Meo and Markus Reiter.
-Homebrew/brew's other current maintainers are Claudia, Michka Popoff, Shaun Jackman, Chongyu Zhu, Vitor Galvao, Misty De Meo, Gautham Goli, Markus Reiter, Steven Peters, Jonathan Chang and William Woodruff.
+Homebrew/brew's other current maintainers are Claudia Pellegrino, Michka Popoff, Shaun Jackman, Chongyu Zhu, Vitor Galvao, Misty De Meo, Gautham Goli, Markus Reiter, Steven Peters, Jonathan Chang and William Woodruff.
Homebrew/brew's Linux support (and Linuxbrew) maintainers are Michka Popoff and Shaun Jackman.
-Homebrew/homebrew-core's other current maintainers are Claudia, Michka Popoff, Shaun Jackman, Chongyu Zhu, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Viktor Szakats, FX Coudert, Thierry Moisan, Steven Peters, Misty De Meo and Tom Schoonjans.
+Homebrew/homebrew-core's other current maintainers are Claudia Pellegrino, Igor Kapkov, Michka Popoff, Shaun Jackman, Chongyu Zhu, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Viktor Szakats, FX Coudert, Thierry Moisan, Steven Peters, Misty De Meo and Tom Schoonjans.
Former maintainers with significant contributions include JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs and Homebrew's creator: Max Howell.
| true |
Other | Homebrew | brew | f15487380d49b89fd29ab993f9b3c7fd26ba2c2f.json | README: add igas, claui surname. | manpages/brew.1 | @@ -1459,13 +1459,13 @@ Homebrew\'s lead maintainer is Mike McQuaid\.
Homebrew\'s project leadership committee is Mike McQuaid, Misty De Meo and Markus Reiter\.
.
.P
-Homebrew/brew\'s other current maintainers are Claudia, Michka Popoff, Shaun Jackman, Chongyu Zhu, Vitor Galvao, Misty De Meo, Gautham Goli, Markus Reiter, Steven Peters, Jonathan Chang and William Woodruff\.
+Homebrew/brew\'s other current maintainers are Claudia Pellegrino, Michka Popoff, Shaun Jackman, Chongyu Zhu, Vitor Galvao, Misty De Meo, Gautham Goli, Markus Reiter, Steven Peters, Jonathan Chang and William Woodruff\.
.
.P
Homebrew/brew\'s Linux support (and Linuxbrew) maintainers are Michka Popoff and Shaun Jackman\.
.
.P
-Homebrew/homebrew\-core\'s other current maintainers are Claudia, Michka Popoff, Shaun Jackman, Chongyu Zhu, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Viktor Szakats, FX Coudert, Thierry Moisan, Steven Peters, Misty De Meo and Tom Schoonjans\.
+Homebrew/homebrew\-core\'s other current maintainers are Claudia Pellegrino, Igor Kapkov, Michka Popoff, Shaun Jackman, Chongyu Zhu, Izaak Beekman, Sean Molenaar, Jan Viljanen, Jason Tedor, Viktor Szakats, FX Coudert, Thierry Moisan, Steven Peters, Misty De Meo and Tom Schoonjans\.
.
.P
Former maintainers with significant contributions include JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs and Homebrew\'s creator: Max Howell\. | true |
Other | Homebrew | brew | 04fbdce3bb963d300179ca6c14812e282d379dbd.json | hardware: use Nehalem flags on >= Sierra.
See https://en.wikipedia.org/wiki/MacOS_Sierra#System_requirements. | Library/Homebrew/extend/os/hardware.rb | @@ -1,4 +1,5 @@
if OS.mac?
+ require "extend/os/mac/hardware"
require "extend/os/mac/hardware/cpu"
elsif OS.linux?
require "extend/os/linux/hardware/cpu" | true |
Other | Homebrew | brew | 04fbdce3bb963d300179ca6c14812e282d379dbd.json | hardware: use Nehalem flags on >= Sierra.
See https://en.wikipedia.org/wiki/MacOS_Sierra#System_requirements. | Library/Homebrew/extend/os/mac/hardware.rb | @@ -0,0 +1,9 @@
+module Hardware
+ def self.oldest_cpu
+ if MacOS.version >= :sierra
+ :nehalem
+ else
+ generic_oldest_cpu
+ end
+ end
+end | true |
Other | Homebrew | brew | 04fbdce3bb963d300179ca6c14812e282d379dbd.json | hardware: use Nehalem flags on >= Sierra.
See https://en.wikipedia.org/wiki/MacOS_Sierra#System_requirements. | Library/Homebrew/hardware.rb | @@ -7,10 +7,11 @@ class CPU
class << self
OPTIMIZATION_FLAGS = {
- core2: "-march=core2",
- core: "-march=prescott",
- armv6: "-march=armv6",
- armv8: "-march=armv8-a",
+ nehalem: "-march=nehalem -msse4.2",
+ core2: "-march=core2",
+ core: "-march=prescott",
+ armv6: "-march=armv6",
+ armv8: "-march=armv8-a",
}.freeze
def optimization_flags
@@ -130,35 +131,38 @@ def can_run?(arch)
end
end
- def self.cores_as_words
- case Hardware::CPU.cores
- when 1 then "single"
- when 2 then "dual"
- when 4 then "quad"
- when 6 then "hexa"
- when 8 then "octa"
- when 12 then "dodeca"
- else
- Hardware::CPU.cores
- end
- end
-
- def self.oldest_cpu
- if Hardware::CPU.intel?
- if Hardware::CPU.is_64_bit?
- :core2
+ class << self
+ def cores_as_words
+ case Hardware::CPU.cores
+ when 1 then "single"
+ when 2 then "dual"
+ when 4 then "quad"
+ when 6 then "hexa"
+ when 8 then "octa"
+ when 12 then "dodeca"
else
- :core
+ Hardware::CPU.cores
end
- elsif Hardware::CPU.arm?
- if Hardware::CPU.is_64_bit?
- :armv8
+ end
+
+ def oldest_cpu
+ if Hardware::CPU.intel?
+ if Hardware::CPU.is_64_bit?
+ :core2
+ else
+ :core
+ end
+ elsif Hardware::CPU.arm?
+ if Hardware::CPU.is_64_bit?
+ :armv8
+ else
+ :armv6
+ end
else
- :armv6
+ Hardware::CPU.family
end
- else
- Hardware::CPU.family
end
+ alias generic_oldest_cpu oldest_cpu
end
end
| true |
Other | Homebrew | brew | 55084dd8abdd566817d24aaf16729a488a7f7a9e.json | Cask: remove malware caveat | Library/Homebrew/cask/dsl/caveats.rb | @@ -141,21 +141,6 @@ def eval_caveats(&block)
#{web_page}
EOS
end
-
- caveat :malware do |radar_number|
- <<~EOS
- #{@cask} has been reported to bundle malware. Like with any app, use at your own risk.
-
- A report has been made to Apple about this app. Their certificate will hopefully be revoked.
- See the public report at
- #{Formatter.url("https://openradar.appspot.com/#{radar_number}")}
-
- If this report is accurate, please duplicate it at
- #{Formatter.url("https://bugreport.apple.com/")}
- If this report is a mistake, please let us know by opening an issue at
- #{Formatter.url("https://github.com/Homebrew/homebrew-cask/issues/new")}
- EOS
- end
end
end
end | false |
Other | Homebrew | brew | cf391ef1605b04b9a00d7f4f49e0a16ff1b8f749.json | Maintainer-Guidelines: add sjackman CI test note. | docs/Maintainer-Guidelines.md | @@ -88,7 +88,10 @@ implemented!).
Don't merge any formula updates with failing `brew test`s. If a `test do` block
is failing it needs to be fixed. This may involve replacing more involved tests
with those that are more reliable. This is fine: false positives are better than
-false negatives as we don't want to teach maintainers to merge red PRs.
+false negatives as we don't want to teach maintainers to merge red PRs. If the
+test failure is believed to be due to a bug in Homebrew/brew or the CI system,
+that bug must be fixed, or worked around in the formula to yield a passing test,
+before the PR can be merged.
## Common “gotchas”
1. [Ensure you have set your username and email address | false |
Other | Homebrew | brew | 33c3faa1252f2391ec456fa922ea2bf654f341b6.json | [`JavaRequirement#satisfies_version`] `java_version_s`: Fix regular expression.
The match obtained by applying the regular expression used to index into
the `stderr` member of the result of calling `system_command` in the relevant
variable assignment could yield unexpected results. The regular expression in-
volved was not strict enough and contained an unescaped period, which could
match any character, not just the expected literal decimal point. This commit
corrects this oversight by escaping the relevant character, thus addressing
@apjanke's remark in https://github.com/Homebrew/brew/pull/5280#issuecomment-437165119 on the existence of a:
> …possible bug - that `.` looks like it should be escaped as `\.` to match a
> literal ".".) … | Library/Homebrew/requirements/java_requirement.rb | @@ -129,7 +129,7 @@ def oracle_java_os
end
def satisfies_version(java)
- java_version_s = system_command(java, args: ["-version"], print_stderr: false).stderr[/\d+.\d/]
+ java_version_s = system_command(java, args: ["-version"], print_stderr: false).stderr[/\d+\.\d/]
return false unless java_version_s
java_version = Version.create(java_version_s) | false |
Other | Homebrew | brew | 8278e6156fd47c95407bd383b63145200ea46173.json | Revert "bin/brew: Pass CIRCLECI environment variable"
This reverts commit 64a95435814632a7d71d5a77157c40259a6acf8d.
Use HOMEBREW_CIRCLECI rather than CIRCLECI.
See https://github.com/Homebrew/brew/pull/5402 | bin/brew | @@ -72,7 +72,7 @@ then
FILTERED_ENV=()
# Filter all but the specific variables.
- for VAR in HOME SHELL PATH TERM COLUMNS LOGNAME USER CI CIRCLECI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \
+ for VAR in HOME SHELL PATH TERM COLUMNS LOGNAME USER CI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
"${!HOMEBREW_@}" "${!TRAVIS_@}"
do | false |
Other | Homebrew | brew | 64a95435814632a7d71d5a77157c40259a6acf8d.json | bin/brew: Pass CIRCLECI environment variable | bin/brew | @@ -72,7 +72,7 @@ then
FILTERED_ENV=()
# Filter all but the specific variables.
- for VAR in HOME SHELL PATH TERM COLUMNS LOGNAME USER CI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \
+ for VAR in HOME SHELL PATH TERM COLUMNS LOGNAME USER CI CIRCLECI TRAVIS SSH_AUTH_SOCK SUDO_ASKPASS \
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
"${!HOMEBREW_@}" "${!TRAVIS_@}"
do | false |
Other | Homebrew | brew | b40849421ce4f4a0c88425a628da1fa55ff10f2f.json | shims/super/cc: Add HOMEBREW_CACHE to white list
Compiling rust projects requires -I$HOMEBREW_CACHE/cargo_cache/... | Library/Homebrew/shims/super/cc | @@ -26,7 +26,7 @@ def linux?
end
class Cmd
- attr_reader :config, :prefix, :cellar, :opt, :tmpdir, :sysroot, :deps
+ attr_reader :config, :prefix, :cellar, :opt, :cachedir, :tmpdir, :sysroot, :deps
attr_reader :archflags, :optflags, :keg_regex, :formula_prefix
def initialize(arg0, args)
@@ -35,6 +35,7 @@ class Cmd
@config = ENV.fetch("HOMEBREW_CCCFG") { "" }
@prefix = ENV["HOMEBREW_PREFIX"]
@cellar = ENV["HOMEBREW_CELLAR"]
+ @cachedir = ENV["HOMEBREW_CACHE"]
@opt = ENV["HOMEBREW_OPT"]
@tmpdir = ENV["HOMEBREW_TEMP"]
@sysroot = ENV["HOMEBREW_SDKROOT"]
@@ -242,7 +243,7 @@ class Cmd
elsif path.start_with?(cellar) || path.start_with?(opt)
dep = path[keg_regex, 2]
dep && @deps.include?(dep)
- elsif path.start_with?(prefix, tmpdir)
+ elsif path.start_with?(prefix, cachedir, tmpdir)
true
elsif path.start_with?("/opt/local", "/opt/boxen/homebrew", "/opt/X11", "/sw", "/usr/X11")
# ignore MacPorts, Boxen's Homebrew, X11, fink | false |
Other | Homebrew | brew | f15f665b989aaa152e8bed11aacbdecb155021ec.json | audit: ensure postgresql previous version exists.
This will avoid https://github.com/Homebrew/homebrew-core/issues/34879
in future. | Library/Homebrew/dev-cmd/audit.rb | @@ -527,6 +527,23 @@ def audit_keg_only_style
problem "keg_only reason should not end with a period."
end
+ def audit_postgresql
+ return unless formula.name == "postgresql"
+ major_version = formula.version
+ .to_s
+ .split(".")
+ .first
+ .to_i
+ previous_major_version = major_version - 1
+ previous_formula_name = "postgresql@#{previous_major_version}"
+ begin
+ Formula[previous_formula_name]
+ rescue FormulaUnavailableError
+ problem "Versioned #{previous_formula_name} must be created for " \
+ "`brew-postgresql-upgrade-database` and `pg_upgrade` to work."
+ end
+ end
+
def audit_versioned_keg_only
return unless @versioned_formula
return unless @core_tap | false |
Other | Homebrew | brew | 1dcf8c689cb3e35d2b727903068c2df27c357ca6.json | Update bash completion docs
When I try to run the proposed script in my `~/.bashrc` file I get this output:
```
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: have: command not found
-bash: [: =: unary operator expected
# ...
```
It goes on for quite some time and does not give me bash completion.
When I execute `source "$(brew --prefix)/etc/bash_completion"` it works and I get bash completion.
This script also emits a helpful error message letting people know if bash completion was not installed already.
I'll also add that the bash completion script takes a fairly long amount of time. I've seen between one quarter and a half of a second to execute it:
```
$ time source "$(brew --prefix)/etc/bash_completion"
real 0m0.254s
```
Though that's unrelated to this PR, making a note of it. | docs/Shell-Completion.md | @@ -7,13 +7,14 @@ Homebrew comes with completion definitions for the `brew` command. Some packages
You must configure your shell to enable the completion support. This is because the Homebrew-managed completions are stored under `HOMEBREW_PREFIX`, which your system shell may not be aware of, and because it is difficult to automatically configure `bash` and `zsh` completions in a robust manner, so the Homebrew installer cannot do it for you.
## Configuring Completions in `bash`
+
To make Homebrew's completions available in `bash`, you must source the definitions as part of your shell startup. Add the following to your `~/.bashrc` file:
```sh
if type brew 2&>/dev/null; then
- for completion_file in $(brew --prefix)/etc/bash_completion.d/*; do
- source "$completion_file"
- done
+ source "$(brew --prefix)/etc/bash_completion"
+else
+ echo "run: brew install git bash-completion"
fi
```
| false |
Other | Homebrew | brew | dff0320f8cbf3593e73c5f1e2d5f49f96a05926c.json | Cask: Remove check on sha-only change | Library/Homebrew/cask/audit.rb | @@ -24,7 +24,6 @@ def check_token_conflicts?
def run!
check_required_stanzas
- check_version_and_checksum
check_version
check_sha256
check_url
@@ -136,31 +135,6 @@ def check_required_stanzas
add_error "at least one activatable artifact stanza is required" if installable_artifacts.empty?
end
- def check_version_and_checksum
- return if cask.sha256 == :no_check
-
- return if @cask.sourcefile_path.nil?
-
- tap = @cask.tap
- return if tap.nil?
-
- return if commit_range.nil?
-
- previous_cask_contents = Git.last_revision_of_file(tap.path, @cask.sourcefile_path, before_commit: commit_range)
- return if previous_cask_contents.empty?
-
- begin
- previous_cask = CaskLoader.load(previous_cask_contents)
-
- return unless previous_cask.version == cask.version
- return if previous_cask.sha256 == cask.sha256
-
- add_error "only sha256 changed (see: https://github.com/Homebrew/homebrew-cask/blob/master/doc/cask_language_reference/stanzas/sha256.md)"
- rescue CaskError => e
- add_warning "Skipped version and checksum comparison. Reading previous version failed: #{e}"
- end
- end
-
def check_version
return unless cask.version
| false |
Other | Homebrew | brew | 79b1d4178e25d674cc7e831a9888769dbd673eb3.json | bottle: Ignore matches to source code
Ignore matches to source code, which is not required at run time.
These matches may be caused by debugging symbols. | Library/Homebrew/dev-cmd/bottle.rb | @@ -342,7 +342,9 @@ def bottle_formula(f)
prefix_check = prefix
end
- ignores = []
+ # Ignore matches to source code, which is not required at run time.
+ # These matches may be caused by debugging symbols.
+ ignores = [%r{/include/|\.(c|cc|cpp|h|hpp)$}]
any_go_deps = f.deps.any? do |dep|
dep.name =~ Version.formula_optionally_versioned_regex(:go)
end | false |
Other | Homebrew | brew | 6d90c81a794cc6fba7c53846130a386d1d5a1ed5.json | Add shims/super/gcc-8 and shims/super/g++-8 | Library/Homebrew/shims/mac/super/g++-8 | @@ -0,0 +1 @@
+cc
\ No newline at end of file | true |
Other | Homebrew | brew | 6d90c81a794cc6fba7c53846130a386d1d5a1ed5.json | Add shims/super/gcc-8 and shims/super/g++-8 | Library/Homebrew/shims/mac/super/gcc-8 | @@ -0,0 +1 @@
+cc
\ No newline at end of file | true |
Other | Homebrew | brew | 6d90c81a794cc6fba7c53846130a386d1d5a1ed5.json | Add shims/super/gcc-8 and shims/super/g++-8 | Library/Homebrew/shims/super/g++-8 | @@ -0,0 +1 @@
+cc
\ No newline at end of file | true |
Other | Homebrew | brew | 6d90c81a794cc6fba7c53846130a386d1d5a1ed5.json | Add shims/super/gcc-8 and shims/super/g++-8 | Library/Homebrew/shims/super/gcc-8 | @@ -0,0 +1 @@
+cc
\ No newline at end of file | true |
Other | Homebrew | brew | 70bf0d39f32632a5a56cda7f1f287ece65650658.json | manpage: add HOMEBREW_UPDATE_TO_TAG docs. | Library/Homebrew/manpages/brew.1.md.erb | @@ -261,6 +261,10 @@ Note that environment variables must have a value set to be detected. For exampl
This issue typically occurs when using FileVault or custom SSD
configurations.
+ * `HOMEBREW_UPDATE_TO_TAG`:
+ If set, instructs Homebrew to always use the latest stable tag (even if
+ developer commands have been run).
+
* `HOMEBREW_UPGRADE_CLEANUP`:
If set, `brew upgrade` always assumes `--cleanup` has been passed.
| true |
Other | Homebrew | brew | 70bf0d39f32632a5a56cda7f1f287ece65650658.json | manpage: add HOMEBREW_UPDATE_TO_TAG docs. | docs/Manpage.md | @@ -1262,6 +1262,10 @@ Note that environment variables must have a value set to be detected. For exampl
This issue typically occurs when using FileVault or custom SSD
configurations.
+ * `HOMEBREW_UPDATE_TO_TAG`:
+ If set, instructs Homebrew to always use the latest stable tag (even if
+ developer commands have been run).
+
* `HOMEBREW_UPGRADE_CLEANUP`:
If set, `brew upgrade` always assumes `--cleanup` has been passed.
| true |
Other | Homebrew | brew | 70bf0d39f32632a5a56cda7f1f287ece65650658.json | manpage: add HOMEBREW_UPDATE_TO_TAG docs. | manpages/brew.1 | @@ -1384,6 +1384,10 @@ If set, instructs Homebrew to use \fBHOMEBREW_TEMP\fR as the temporary directory
This issue typically occurs when using FileVault or custom SSD configurations\.
.
.TP
+\fBHOMEBREW_UPDATE_TO_TAG\fR
+If set, instructs Homebrew to always use the latest stable tag (even if developer commands have been run)\.
+.
+.TP
\fBHOMEBREW_UPGRADE_CLEANUP\fR
If set, \fBbrew upgrade\fR always assumes \fB\-\-cleanup\fR has been passed\.
. | true |
Other | Homebrew | brew | 5e2f87f7ac860fc18105ef60a63c141b405ea0f8.json | CurlDownloadStrategy: handle Location indicating the current dir.
If a response contains a Location header starting with `./`, substitute just final component of the URL path with the given filename. | Library/Homebrew/download_strategy.rb | @@ -353,6 +353,9 @@ def resolve_url_basename_time(url)
elsif location.start_with?("/")
uri = URI(current_url)
"#{uri.scheme}://#{uri.host}#{location}"
+ elsif location.start_with?("./")
+ uri = URI(current_url)
+ "#{uri.scheme}://#{uri.host}#{Pathname(uri.path).dirname/location}"
else
location
end | false |
Other | Homebrew | brew | 81e2fbd032886a50a9550a49288e73c547b137ec.json | docs: update instructions for OS X < 10.9 | Library/Homebrew/extend/os/mac/diagnostic.rb | @@ -61,7 +61,7 @@ def check_for_unsupported_macos
You are using macOS #{MacOS.version}.
#{who} do not provide support for this #{what}.
You will encounter build failures and other breakages.
- Please create pull-requests instead of asking for help on Homebrew's
+ Please create pull requests instead of asking for help on Homebrew's
GitHub, Discourse, Twitter or IRC. As you are running this #{what},
you are responsible for resolving any issues you experience.
EOS | true |
Other | Homebrew | brew | 81e2fbd032886a50a9550a49288e73c547b137ec.json | docs: update instructions for OS X < 10.9 | docs/Installation.md | @@ -19,9 +19,10 @@ it does it too. And you have to confirm everything it will do before it starts.
## Alternative Installs
-### OS X Lion 10.7 and below
+### OS X Mountain Lion (10.8) and below
+Because GitHub now only allows clients that support TLS 1.2 to access repositories over HTTPS, the Homebrew installer will use the GIT protocol when run on systems older than OS X Mavericks (10.9). This requires the availability of a `git` binary, which can be provided by pre-installing the [Command Line Tools or Xcode](https://developer.apple.com/download/more/) on Lion or Mountain Lion, or a [prepackaged installer](https://code.google.com/archive/p/git-osx-installer/downloads) on Leopard or Snow Leopard. Homebrew will also require the Command Line Tools or Xcode in order to automatically compile and install a newer `curl` and `git` with support for TLS 1.2.
-Using the instructions on https://brew.sh or below whenever you call `curl` you must pass `--insecure` as an argument. This is because your system `curl` is too old to speak to GitHub using HTTPS. Don't worry, on the first `brew update` Homebrew will install a newer, more secure `curl` for your machine.
+Also note that when installing on OS X Leopard (10.5), you need to bypass its outdated built-in certificates by adding `--insecure` to the [installation command](https://brew.sh/#install)'s list of `curl` flags.
### Untar anywhere
Just extract (or `git clone`) Homebrew wherever you want. Just avoid: | true |
Other | Homebrew | brew | 75aae9c8a87bbdd81cf1378e619265014e7b9cfb.json | reinstall: Add verbose flag | Library/Homebrew/cmd/reinstall.rb | @@ -28,6 +28,7 @@ def reinstall_args
EOS
switch "--display-times",
description: "Print install times for each formula at the end of the run."
+ switch :verbose
switch :debug
end
end | false |
Other | Homebrew | brew | cea9942a1d525fca4e7d0f87f00bd369c9e634eb.json | Fix code style. | Library/Homebrew/cmd/update-report.rb | @@ -427,7 +427,7 @@ def add(reporter)
@hash.update(report) { |_key, oldval, newval| oldval.concat(newval) }
end
- delegate :empty? => :@hash
+ delegate empty?: :@hash
def dump
# Key Legend: Added (A), Copied (C), Deleted (D), Modified (M), Renamed (R) | true |
Other | Homebrew | brew | cea9942a1d525fca4e7d0f87f00bd369c9e634eb.json | Fix code style. | Library/Homebrew/test/support/helper/spec/shared_context/homebrew_cask.rb | @@ -5,10 +5,10 @@
require "test/support/helper/cask/never_sudo_system_command"
HOMEBREW_CASK_DIRS = {
- :appdir => Pathname.new(TEST_TMPDIR).join("cask-appdir"),
- :prefpanedir => Pathname.new(TEST_TMPDIR).join("cask-prefpanedir"),
- :qlplugindir => Pathname.new(TEST_TMPDIR).join("cask-qlplugindir"),
- :servicedir => Pathname.new(TEST_TMPDIR).join("cask-servicedir"),
+ appdir: Pathname.new(TEST_TMPDIR).join("cask-appdir"),
+ prefpanedir: Pathname.new(TEST_TMPDIR).join("cask-prefpanedir"),
+ qlplugindir: Pathname.new(TEST_TMPDIR).join("cask-qlplugindir"),
+ servicedir: Pathname.new(TEST_TMPDIR).join("cask-servicedir"),
}.freeze
RSpec.shared_context "Homebrew Cask", :needs_macos do | true |
Other | Homebrew | brew | fc40e2fa4006412ba96aad8729027d40c38c7129.json | brew deps: Fix typo in `--include-optional` output.
This was missing its closing square bracket. | Library/Homebrew/cmd/deps.rb | @@ -130,7 +130,7 @@ def dep_display_name(dep)
if ARGV.include?("--annotate")
str = "#{str} [build]" if dep.build?
str = "#{str} [test]" if dep.test?
- str = "#{str} [optional" if dep.optional?
+ str = "#{str} [optional]" if dep.optional?
str = "#{str} [recommended]" if dep.recommended?
end
| false |
Other | Homebrew | brew | 2f2304ea408640439be010c4b6c433083fd771be.json | dev-cmd/bottle: recognize version_scheme in merge | Library/Homebrew/dev-cmd/bottle.rb | @@ -540,7 +540,7 @@ def merge
(\n^\ {3}[\S\ ]+$)* # options can be in multiple lines
)?|
(homepage|desc|sha1|sha256|version|mirror)\ ['"][\S\ ]+['"]| # specs with a string
- revision\ \d+ # revision with a number
+ (revision|version_scheme)\ \d+ # revision with a number
)\n+ # multiple empty lines
)+
/mx | false |
Other | Homebrew | brew | 35b8c3d6e2c2cfcddf754989dcc0e5265d4f88f1.json | Increase timeout tolerance.
Co-Authored-By: reitermarkus <me@reitermark.us> | Library/Homebrew/test/cask/artifact/shared_examples/uninstall_zap.rb | @@ -149,7 +149,7 @@
}.to output(/Application 'my.fancy.package.app' did not quit\./).to_stderr
end
- expect(time.real).to be_within(0.5).of(10)
+ expect(time.real).to be_within(3).of(10)
end
end
| false |
Other | Homebrew | brew | f61b963744c41b62c0253ee8cdbeb5f7b576dafe.json | Improve application quitting. | Library/Homebrew/cask/artifact/abstract_uninstall.rb | @@ -94,8 +94,10 @@ def uninstall_launchctl(*services, command: nil, **_)
command.run!("/bin/launchctl", args: ["remove", service], sudo: with_sudo)
sleep 1
end
- paths = ["/Library/LaunchAgents/#{service}.plist",
- "/Library/LaunchDaemons/#{service}.plist"]
+ paths = [
+ "/Library/LaunchAgents/#{service}.plist",
+ "/Library/LaunchDaemons/#{service}.plist",
+ ]
paths.each { |elt| elt.prepend(ENV["HOME"]) } unless with_sudo
paths = paths.map { |elt| Pathname(elt) }.select(&:exist?)
paths.each do |path|
@@ -130,21 +132,52 @@ def uninstall_quit(*bundle_ids, command: nil, **_)
next
end
- ohai "Quitting application ID '#{bundle_id}'."
- command.run!("/usr/bin/osascript", args: ["-e", %Q(tell application id "#{bundle_id}" to quit)], sudo: true)
+ ohai "Quitting application '#{bundle_id}'..."
begin
- Timeout.timeout(3) do
+ Timeout.timeout(10) do
Kernel.loop do
- break if running_processes(bundle_id, command: command).empty?
+ next unless quit(bundle_id).success?
+ if running_processes(bundle_id, command: command).empty?
+ puts "Application '#{bundle_id}' quit successfully."
+ break
+ end
end
end
rescue Timeout::Error
+ opoo "Application '#{bundle_id}' did not quit."
next
end
end
end
+ def quit(bundle_id)
+ script = <<~JAVASCRIPT
+ 'use strict';
+
+ ObjC.import('stdlib')
+
+ function run(argv) {
+ var app = Application(argv[0])
+
+ try {
+ app.quit()
+ } catch (err) {
+ if (app.running()) {
+ $.exit(1)
+ }
+ }
+
+ $.exit(0)
+ }
+ JAVASCRIPT
+
+ system_command "osascript", args: ["-l", "JavaScript", "-e", script, bundle_id],
+ print_stderr: false,
+ sudo: true
+ end
+ private :quit
+
# :signal should come after :quit so it can be used as a backup when :quit fails
def uninstall_signal(*signals, command: nil, **_)
signals.each do |pair|
@@ -175,7 +208,7 @@ def uninstall_login_item(*login_items, command: nil, upgrade: false, **_)
login_items.each do |name|
ohai "Removing login item #{name}"
command.run!(
- "/usr/bin/osascript",
+ "osascript",
args: [
"-e",
%Q(tell application "System Events" to delete every login item whose name is "#{name}"),
@@ -287,7 +320,7 @@ def uninstall_trash(*paths, **options)
end
def trash_paths(*paths, command: nil, **_)
- result = command.run!("/usr/bin/osascript", args: ["-e", <<~APPLESCRIPT, *paths])
+ result = command.run!("osascript", args: ["-e", <<~APPLESCRIPT, *paths])
on run argv
repeat with i from 1 to (count argv)
set item i of argv to (item i of argv as POSIX file) | true |
Other | Homebrew | brew | f61b963744c41b62c0253ee8cdbeb5f7b576dafe.json | Improve application quitting. | Library/Homebrew/test/cask/artifact/uninstall_zap_shared_examples.rb | @@ -253,8 +253,7 @@
it "is supported" do
FakeSystemCommand.expects_command(
- ["/usr/bin/osascript", "-e", 'tell application "System Events" to delete every login ' \
- 'item whose name is "Fancy"'],
+ ["osascript", "-e", 'tell application "System Events" to delete every login item whose name is "Fancy"'],
)
subject | true |
Other | Homebrew | brew | 6b779c4f6db64e106adfc1949f7bd3b96c49097e.json | exceptions.rb: avoid failure if no arguments | Library/Homebrew/exceptions.rb | @@ -360,8 +360,8 @@ def initialize(formula, cmd, args, env)
@cmd = cmd
@args = args
@env = env
- pretty_args = args.map { |arg| arg.to_s.gsub " ", "\\ " }.join(" ")
- super "Failed executing: #{cmd} #{pretty_args}"
+ pretty_args = Array(args).map { |arg| arg.to_s.gsub " ", "\\ " }.join(" ")
+ super "Failed executing: #{cmd} #{pretty_args}".strip
end
def issues | false |
Other | Homebrew | brew | 3dbbcd11cc8b2d70cf8cef901c2e268d3e75cc7f.json | Remove unused test cask. | Library/Homebrew/test/support/fixtures/cask/Casks/compat/with-dsl-version.rb | @@ -1,9 +0,0 @@
-cask :v1 => 'with-dsl-version' do
- version '1.2.3'
- sha256 '8c62a2b791cf5f0da6066a0a4b6e85f62949cd60975da062df44adf887f4370b'
-
- url 'https://example.com/TestCask.dmg'
- homepage 'https://example.com/'
-
- app 'TestCask.app'
-end | false |
Other | Homebrew | brew | f70a2c67da7dfb4abf7c6ae0044abb248d518781.json | pull --bottle: Fix bug in any_bottle_tag
Utils::Bottles.tag is a symbol, whereas bottle_tags is an array of strings. | Library/Homebrew/dev-cmd/pull.rb | @@ -581,7 +581,7 @@ def bottle_info_any
end
def any_bottle_tag
- tag = Utils::Bottles.tag
+ tag = Utils::Bottles.tag.to_s
# Prefer native bottles as a convenience for download caching
bottle_tags.include?(tag) ? tag : bottle_tags.first
end
@@ -640,7 +640,7 @@ def verify_bintray_published(formulae_names)
opoo "Cannot publish bottle: Failed reading info for formula #{f.full_name}"
next
end
- bottle_info = jinfo.bottle_info(jinfo.bottle_tags.first)
+ bottle_info = jinfo.bottle_info_any
unless bottle_info
opoo "No bottle defined in formula #{f.full_name}"
next | false |
Other | Homebrew | brew | 77daf29c474bdf05945ca587292c01f498953fd7.json | python_virtualenv_constants: upgrade virtualenv to 16.1.0 | Library/Homebrew/language/python_virtualenv_constants.rb | @@ -1,6 +1,6 @@
PYTHON_VIRTUALENV_URL =
- "https://files.pythonhosted.org/packages/33/bc" \
- "/fa0b5347139cd9564f0d44ebd2b147ac97c36b2403943dbee8a25fd74012" \
- "/virtualenv-16.0.0.tar.gz".freeze
+ "https://files.pythonhosted.org/packages/4e/8b" \
+ "/75469c270ac544265f0020aa7c4ea925c5284b23e445cf3aa8b99f662690" \
+ "/virtualenv-16.1.0.tar.gz".freeze
PYTHON_VIRTUALENV_SHA256 =
- "ca07b4c0b54e14a91af9f34d0919790b016923d157afda5efdde55c96718f752".freeze
+ "f899fafcd92e1150f40c8215328be38ff24b519cd95357fa6e78e006c7638208".freeze | false |
Other | Homebrew | brew | 7116b74705589f846428b1af4e0db7ca9feb0302.json | dev-cmd/bottle: require arg for --root-url | Library/Homebrew/dev-cmd/bottle.rb | @@ -106,7 +106,7 @@ def bottle_args
depends_on: "--write",
description: "When passed with `--write`, a new commit will not generated after writing changes "\
"to the formula file."
- flag "--root-url",
+ flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
switch :verbose
switch :debug | true |
Other | Homebrew | brew | 7116b74705589f846428b1af4e0db7ca9feb0302.json | dev-cmd/bottle: require arg for --root-url | Library/Homebrew/test/dev-cmd/bottle_spec.rb | @@ -12,6 +12,11 @@
.and not_to_output.to_stdout
.and be_a_failure
+ expect { brew "bottle", "--root-url" }
+ .to output(/missing argument: --root-url/).to_stderr
+ .and not_to_output.to_stdout
+ .and be_a_failure
+
setup_test_formula "testball"
# `brew bottle` should not fail with dead symlink | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.