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
f951a22beacdae7dd95c94eba67236fe221a3ca0.json
Install etc/var files on postinstall. Also, don't delete them after that. This means that `brew postinstall` becomes a way to easily reinstall configuration files for any formula without needing any changes to any bottles or requiring a reinstall.
Library/Homebrew/formula.rb
@@ -1004,11 +1004,6 @@ def pour_bottle_check_unsatisfied_reason # Can be overridden to run commands on both source and bottle installation. def post_install; end - # @private - def post_install_defined? - method(:post_install).owner == self.class - end - # @private def run_post_install @prefix_...
true
Other
Homebrew
brew
f951a22beacdae7dd95c94eba67236fe221a3ca0.json
Install etc/var files on postinstall. Also, don't delete them after that. This means that `brew postinstall` becomes a way to easily reinstall configuration files for any formula without needing any changes to any bottles or requiring a reinstall.
Library/Homebrew/formula_installer.rb
@@ -564,13 +564,11 @@ def finish fix_dynamic_linkage(keg) end - if formula.post_install_defined? - if build_bottle? - ohai "Not running post_install as we're building a bottle" - puts "You can run it manually using `brew postinstall #{formula.full_name}`" - else - post_in...
true
Other
Homebrew
brew
f951a22beacdae7dd95c94eba67236fe221a3ca0.json
Install etc/var files on postinstall. Also, don't delete them after that. This means that `brew postinstall` becomes a way to easily reinstall configuration files for any formula without needing any changes to any bottles or requiring a reinstall.
Library/Homebrew/test/formula_spec.rb
@@ -10,7 +10,6 @@ RSpec::Matchers.alias_matcher :have_changed_alias, :be_alias_changed RSpec::Matchers.alias_matcher :have_option_defined, :be_option_defined -RSpec::Matchers.alias_matcher :have_post_install_defined, :be_post_install_defined RSpec::Matchers.alias_matcher :have_test_defined, :be_test_defined RSpec...
true
Other
Homebrew
brew
5b19563937bab44fb98648a8dabdb9dc930a0ac3.json
utils: create GEM_HOME when installing Gems. It may not exist before Gem installation which means that the resulting installed gem will not be found in the PATH.
Library/Homebrew/utils.rb
@@ -189,6 +189,9 @@ def install_gem_setup_path!(name, version = nil, executable = name) Gem.clear_paths Gem::Specification.reset + # Create GEM_HOME which may not exist yet so it exists when creating PATH. + FileUtils.mkdir_p Gem.bindir + # Add Gem binary directory and (if missing) Ruby binary di...
false
Other
Homebrew
brew
bf491e5102f52847ba93aad0dc0f2976f86395d6.json
audit_spec: add keg_only_style tests
Library/Homebrew/test/dev-cmd/audit_spec.rb
@@ -322,6 +322,69 @@ def caveats .to eq(["Don't recommend setuid in the caveats, suggest sudo instead."]) end + describe "#audit_keg_only_style" do + specify "keg_only_needs_downcasing" do + fa = formula_auditor "foo", <<-EOS.undent, strict: true + class Foo < Formula + url "http://...
false
Other
Homebrew
brew
b8e17502a304b987268340611127907fe6e0a518.json
README: update hosting providers.
README.md
@@ -65,9 +65,7 @@ Our Xserve ESXi boxes for CI are hosted by [MacStadium](https://www.macstadium.c [![Powered by MacStadium](https://cloud.githubusercontent.com/assets/125011/22776032/097557ac-eea6-11e6-8ba8-eff22dfd58f1.png)](https://www.macstadium.com) -Our Mac Minis for CI were paid for by [our Kickstarter supp...
false
Other
Homebrew
brew
ffe1ee1636bba266b2d8180300375dc1a86794cd.json
Install a bottle from an URL
Library/Homebrew/formulary.rb
@@ -105,7 +105,18 @@ def load_file # Loads formulae from bottles. class BottleLoader < FormulaLoader def initialize(bottle_name) - @bottle_filename = Pathname(bottle_name).realpath + case bottle_name + when %r{(https?|ftp|file)://} + # The name of the formula is found between the last s...
false
Other
Homebrew
brew
1be5eeec26000b881c2ec8ff53333266eedd9fff.json
Add test and comment for `PATH#existing`.
Library/Homebrew/PATH.rb
@@ -59,6 +59,7 @@ def empty? def existing existing_path = select(&File.method(:directory?)) + # return nil instead of empty PATH, to unset environment variables existing_path unless existing_path.empty? end
true
Other
Homebrew
brew
1be5eeec26000b881c2ec8ff53333266eedd9fff.json
Add test and comment for `PATH#existing`.
Library/Homebrew/test/PATH_spec.rb
@@ -107,5 +107,9 @@ expect(path.existing.to_ary).to eq(["/path1"]) expect(path.to_ary).to eq(["/path1", "/path2"]) end + + it "returns nil instead of an empty #{described_class}" do + expect(described_class.new.existing).to be nil + end end end
true
Other
Homebrew
brew
1c7238e59ba49e8c86c9830fa43d4007d24f6e83.json
Add tests for `PATH#select` and `PATH#reject`.
Library/Homebrew/test/PATH_spec.rb
@@ -86,6 +86,18 @@ end end + describe "#select" do + it "returns an object of the same class instead of an Array" do + expect(described_class.new.select { true }).to be_a(described_class) + end + end + + describe "#reject" do + it "returns an object of the same class instead of an Array" do +...
false
Other
Homebrew
brew
e70f2ec33233422b70db047338aa85d9e2088042.json
Make sure duplicates are remove from `PATH`.
Library/Homebrew/PATH.rb
@@ -4,12 +4,12 @@ def initialize(*paths) end def prepend(*paths) - @paths.unshift(*parse(*paths)) + @paths = parse(*paths, *@paths) self end def append(*paths) - @paths.concat(parse(*paths)) + @paths = parse(*@paths, *paths) self end
true
Other
Homebrew
brew
e70f2ec33233422b70db047338aa85d9e2088042.json
Make sure duplicates are remove from `PATH`.
Library/Homebrew/test/PATH_spec.rb
@@ -13,6 +13,10 @@ it "splits an existing PATH" do expect(described_class.new("/path1:/path2")).to eq(["/path1", "/path2"]) end + + it "removes duplicates" do + expect(described_class.new("/path1", "/path1")).to eq("/path1") + end end describe "#to_ary" do @@ -31,12 +35,20 @@ it...
true
Other
Homebrew
brew
f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.json
Use `PATH` where possible.
Library/Homebrew/brew.rb
@@ -12,9 +12,9 @@ HOMEBREW_LIBRARY_PATH = Pathname.new(__FILE__).realpath.parent $:.unshift(HOMEBREW_LIBRARY_PATH.to_s) require "global" +require "tap" if ARGV == %w[--version] || ARGV == %w[-v] - require "tap" puts "Homebrew #{HOMEBREW_VERSION}" puts "Homebrew/homebrew-core #{CoreTap.instance.version_stri...
true
Other
Homebrew
brew
f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.json
Use `PATH` where possible.
Library/Homebrew/cmd/sh.rb
@@ -23,7 +23,7 @@ def sh ENV.setup_build_environment if superenv? # superenv stopped adding brew's bin but generally users will want it - ENV["PATH"] = ENV["PATH"].split(File::PATH_SEPARATOR).insert(1, "#{HOMEBREW_PREFIX}/bin").join(File::PATH_SEPARATOR) + ENV["PATH"] = PATH.new(PATH.new(ENV[...
true
Other
Homebrew
brew
f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.json
Use `PATH` where possible.
Library/Homebrew/diagnostic.rb
@@ -100,7 +100,7 @@ def check_for_installed_developer_tools # See https://github.com/Homebrew/legacy-homebrew/pull/9986 def check_path_for_trailing_slashes - all_paths = ENV["PATH"].split(File::PATH_SEPARATOR) + all_paths = PATH.new(ENV["PATH"]).to_a bad_paths = all_paths.select {...
true
Other
Homebrew
brew
f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.json
Use `PATH` where possible.
Library/Homebrew/extend/ENV/shared.rb
@@ -1,6 +1,7 @@ require "formula" require "compilers" require "development_tools" +require "PATH" # Homebrew extends Ruby's `ENV` to make our code more readable. # Implemented in {SharedEnvExtension} and either {Superenv} or @@ -80,7 +81,7 @@ def prepend(keys, value, separator = " ") end def append_path(...
true
Other
Homebrew
brew
f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.json
Use `PATH` where possible.
Library/Homebrew/extend/ENV/super.rb
@@ -104,7 +104,7 @@ def determine_path path = PATH.new(Superenv.bin) # Formula dependencies can override standard tools. - path.append(deps.map { |d| d.opt_bin.to_s }) + path.append(deps.map(&:opt_bin)) path.append(homebrew_extra_paths) path.append("/usr/bin", "/bin", "/usr/sbin", "/sbin")
true
Other
Homebrew
brew
f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.json
Use `PATH` where possible.
Library/Homebrew/global.rb
@@ -56,7 +56,7 @@ def raise_deprecation_exceptions? require "compat" unless ARGV.include?("--no-compat") || ENV["HOMEBREW_NO_COMPAT"] ENV["HOMEBREW_PATH"] ||= ENV["PATH"] -ORIGINAL_PATHS = ENV["HOMEBREW_PATH"].split(File::PATH_SEPARATOR).map do |p| +ORIGINAL_PATHS = PATH.new(ENV["HOMEBREW_PATH"]).to_a.map do |p| ...
true
Other
Homebrew
brew
f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.json
Use `PATH` where possible.
Library/Homebrew/requirement.rb
@@ -96,7 +96,7 @@ def modify_build_environment # PATH. parent = satisfied_result_parent return unless parent - return if ENV["PATH"].split(File::PATH_SEPARATOR).include?(parent.to_s) + return if PATH.new(ENV["PATH"]).to_a.include?(parent.to_s) ENV.append_path("PATH", parent) end @@ -151,1...
true
Other
Homebrew
brew
f8ad9d7efd5f3f489ed3c1671f16eb2a2eaef822.json
Use `PATH` where possible.
Library/Homebrew/utils.rb
@@ -293,7 +293,7 @@ def quiet_system(cmd, *args) end def which(cmd, path = ENV["PATH"]) - path.split(File::PATH_SEPARATOR).each do |p| + PATH.new(path).to_a.each do |p| begin pcmd = File.expand_path(cmd, p) rescue ArgumentError @@ -307,7 +307,7 @@ def which(cmd, path = ENV["PATH"]) end def wh...
true
Other
Homebrew
brew
a16746906d463ce9e4dc129bc5a76b81585ee1dd.json
Add `PATH` class.
Library/Homebrew/PATH.rb
@@ -0,0 +1,61 @@ +class PATH + def initialize(*paths) + @paths = parse(*paths) + end + + def prepend(*paths) + @paths.unshift(*parse(*paths)) + self + end + + def append(*paths) + @paths.concat(parse(*paths)) + self + end + + def to_ary + @paths + end + alias to_a to_ary + + def to_str + ...
true
Other
Homebrew
brew
a16746906d463ce9e4dc129bc5a76b81585ee1dd.json
Add `PATH` class.
Library/Homebrew/global.rb
@@ -3,6 +3,7 @@ require "extend/pathname" require "extend/git_repository" require "extend/ARGV" +require "PATH" require "extend/string" require "os" require "utils"
true
Other
Homebrew
brew
a16746906d463ce9e4dc129bc5a76b81585ee1dd.json
Add `PATH` class.
Library/Homebrew/test/PATH_spec.rb
@@ -0,0 +1,52 @@ +require "PATH" + +describe PATH do + describe "#initialize" do + it "can take multiple arguments" do + expect(described_class.new("/path1", "/path2")).to eq("/path1:/path2") + end + + it "can parse a mix of arrays and arguments" do + expect(described_class.new(["/path1", "/path2"],...
true
Other
Homebrew
brew
7a75de7cb135cfa832acbf58819329cc19b0fe41.json
pull: fix status code check in check_bintray_mirror The status code of the last redirect should be 2xx to be deemed successful.
Library/Homebrew/dev-cmd/pull.rb
@@ -608,7 +608,7 @@ def verify_bintray_published(formulae_names) def check_bintray_mirror(name, url) headers = curl_output("--connect-timeout", "15", "--head", url)[0] status_code = headers.scan(%r{^HTTP\/.* (\d+)}).last.first - return if status_code.start_with?("3") + return if status_code.start_wit...
false
Other
Homebrew
brew
539881f51a69b1f5cf169766d1115c8b7343bd09.json
Taps and Forks: remove mailing list mention.
docs/Interesting-Taps-&-Forks.md
@@ -15,7 +15,7 @@ Homebrew has the capability to add (and remove) multiple taps to your local inst `brew search` looks in these taps as well as in [homebrew/core](https://github.com/Homebrew/homebrew-core) so don't worry about missing stuff. -You can be added as a maintainer for one of the Homebrew organization ta...
false
Other
Homebrew
brew
f02d7b93a79ccc71e1314f743e6cab19dff2b439.json
brew.sh: use OS X in user agent rather than macOS. This matches what Safari does on macOS 10.12 and is generally what tools like Google Analytics expect the format to be.
Library/Homebrew/brew.sh
@@ -100,7 +100,8 @@ then # This is i386 even on x86_64 machines [[ "$HOMEBREW_PROCESSOR" = "i386" ]] && HOMEBREW_PROCESSOR="Intel" HOMEBREW_MACOS_VERSION="$(/usr/bin/sw_vers -productVersion)" - HOMEBREW_OS_VERSION="macOS $HOMEBREW_MACOS_VERSION" + # Don't change this from OS X to match what macOS itself does...
false
Other
Homebrew
brew
5647fdb2f9317d3b808a08b6ac711634e463ed75.json
audit: fix audit of new formulae. When auditing new formulae without `--new-formula` the `audit_revision_and_version_scheme` method fails ungracefully. Instead, set some better defaults so fewer checks are needed. Fixes #2551.
Library/Homebrew/dev-cmd/audit.rb
@@ -750,7 +750,7 @@ def audit_revision_and_version_scheme current_version_scheme = formula.version_scheme [:stable, :devel].each do |spec| spec_version_scheme_map = attributes_map[:version_scheme][spec] - next if spec_version_scheme_map.nil? || spec_version_scheme_map.empty? + next if spec_ve...
true
Other
Homebrew
brew
5647fdb2f9317d3b808a08b6ac711634e463ed75.json
audit: fix audit of new formulae. When auditing new formulae without `--new-formula` the `audit_revision_and_version_scheme` method fails ungracefully. Instead, set some better defaults so fewer checks are needed. Fixes #2551.
Library/Homebrew/formula_versions.rb
@@ -67,11 +67,17 @@ def version_attributes_map(attributes, branch) attributes_map = {} return attributes_map if attributes.empty? + attributes.each do |attribute| + attributes_map[attribute] ||= { + stable: {}, + devel: {}, + } + end + stable_versions_seen = 0 rev_lis...
true
Other
Homebrew
brew
3589e24df03adc074081549229d8cc244643eee4.json
tap: fix env typo.
Library/Homebrew/tap.rb
@@ -527,7 +527,7 @@ def read_or_set_private_config # A specialized {Tap} class for the core formulae class CoreTap < Tap def default_remote - if OS.mac? || ENV["$HOMEBREW_FORCE_HOMEBREW_ORG"] + if OS.mac? || ENV["HOMEBREW_FORCE_HOMEBREW_ORG"] "https://github.com/Homebrew/homebrew-core".freeze els...
false
Other
Homebrew
brew
b2a291529d0878a51e3e082c3668c54abdbff6c1.json
audit: fix use of search_tap method. This was removed in #2540 but this call site was note updated to use the `search_taps` method instead.
Library/Homebrew/dev-cmd/audit.rb
@@ -368,11 +368,11 @@ def audit_formula_name same_name_tap_formulae = @@local_official_taps_name_map[name] || [] if @online - @@remote_official_taps ||= OFFICIAL_TAPS - Tap.select(&:official?).map(&:repo) - - same_name_tap_formulae += @@remote_official_taps.map do |tap| - Thread.new { Homeb...
false
Other
Homebrew
brew
133e5ddf6ad1b7c931f4686922ba4d61ea450f3a.json
Remove unnecessary block.
Library/Homebrew/utils/github.rb
@@ -234,7 +234,7 @@ def issues_matching(query, qualifiers = {}) end def repository(user, repo) - open(URI.parse("#{API_URL}/repos/#{user}/#{repo}")) { |j| j } + open(URI.parse("#{API_URL}/repos/#{user}/#{repo}")) end def search_code(*params)
false
Other
Homebrew
brew
238cd5430f47895ef930756f2c3fb8b770a89f46.json
Add remote search to `brew cask search`.
Library/Homebrew/cask/lib/hbc/cli/search.rb
@@ -13,6 +13,15 @@ def self.extract_regexp(string) end end + def self.search_remote(query) + matches = GitHub.search_code("user:caskroom", "path:Casks", "filename:#{query}", "extension:rb") + [*matches].map do |match| + tap = Tap.fetch(match["repository"]["full_name"]) + ...
true
Other
Homebrew
brew
238cd5430f47895ef930756f2c3fb8b770a89f46.json
Add remote search to `brew cask search`.
Library/Homebrew/test/cask/cli/search_spec.rb
@@ -3,7 +3,7 @@ expect { Hbc::CLI::Search.run("local") }.to output(<<-EOS.undent).to_stdout - ==> Partial matches + ==> Partial Matches local-caffeine local-transmission EOS @@ -42,13 +42,13 @@ it "accepts a regexp argument" do expect { Hbc::CLI::Search.run("...
true
Other
Homebrew
brew
b3c69aba87f21bb2a3b6a78de3328e22fe39e1c6.json
search: use single HTTP call for tap searches. Use GitHub's code search API to search using the filename based on the search query. This means we only need a single HTTP call and no more multithreading madness. This also means we're able to search everything in the Homebrew and Caskroom organisation by default without...
Library/Homebrew/cmd/search.rb
@@ -16,15 +16,12 @@ require "formula" require "missing_formula" require "utils" -require "thread" require "official_taps" require "descriptions" module Homebrew module_function - SEARCH_ERROR_QUEUE = Queue.new - def search if ARGV.empty? puts Formatter.columns(Formula.full_names) @@ -61,8 +...
true
Other
Homebrew
brew
b3c69aba87f21bb2a3b6a78de3328e22fe39e1c6.json
search: use single HTTP call for tap searches. Use GitHub's code search API to search using the filename based on the search query. This means we only need a single HTTP call and no more multithreading madness. This also means we're able to search everything in the Homebrew and Caskroom organisation by default without...
Library/Homebrew/test/cmd/search_remote_tap_spec.rb
@@ -1,19 +1,24 @@ require "cmd/search" describe Homebrew do - specify "#search_tap" do + specify "#search_taps" do json_response = { - "tree" => [ + "items" => [ { - "path" => "Formula/not-a-formula.rb", - "type" => "blob", + "path" => "Formula/some-formula.rb", ...
true
Other
Homebrew
brew
3585dfd9bd84005ba20e4a97802dea13fb82c63e.json
remove inner group
Library/Homebrew/version.rb
@@ -346,7 +346,7 @@ def self._parse(spec) # date-based versioning # e.g. ltopers-v2017-04-14.tar.gz - m = /-v?(?:\d{4}-\d{2}-\d{2})/.match(stem) + m = /-v?(\d{4}-\d{2}-\d{2})/.match(stem) return m.captures.first unless m.nil? # e.g. lame-398-1
false
Other
Homebrew
brew
17aa90a2c591d922b293a73bdf68e0bfeb0e1301.json
remove inner uncaptured group
Library/Homebrew/version.rb
@@ -346,7 +346,7 @@ def self._parse(spec) # date-based versioning # e.g. ltopers-v2017-04-14.tar.gz - m = /-v?((?:\d{4}-\d{2}-\d{2}))/.match(stem) + m = /-v?(?:\d{4}-\d{2}-\d{2})/.match(stem) return m.captures.first unless m.nil? # e.g. lame-398-1
false
Other
Homebrew
brew
e8ef50d0750b8e3b36427e2fc8878fbcd6f3f443.json
readall: fix tapping taps without aliases. Fixes https://github.com/caskroom/homebrew-cask/issues/32840. Fixes https://github.com/Homebrew/brew/issues/2529.
Library/Homebrew/readall.rb
@@ -25,7 +25,7 @@ def valid_ruby_syntax?(ruby_files) end def valid_aliases?(alias_dir, formula_dir) - return false unless alias_dir.directory? + return true unless alias_dir.directory? failed = false alias_dir.each_child do |f|
false
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/dev-cmd/mirror.rb
@@ -8,10 +8,10 @@ module Homebrew def mirror odie "This command requires at least formula argument!" if ARGV.named.empty? - bintray_user = ENV["BINTRAY_USER"] - bintray_key = ENV["BINTRAY_KEY"] + bintray_user = ENV["HOMEBREW_BINTRAY_USER"] + bintray_key = ENV["HOMEBREW_BINTRAY_KEY"] if !bintr...
true
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/dev-cmd/pull.rb
@@ -263,7 +263,7 @@ def publish_changed_formula_bottles(_tap, changed_formulae_names) end published = [] - bintray_creds = { user: ENV["BINTRAY_USER"], key: ENV["BINTRAY_KEY"] } + bintray_creds = { user: ENV["HOMEBREW_BINTRAY_USER"], key: ENV["HOMEBREW_BINTRAY_KEY"] } if bintray_creds[:user] && b...
true
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/diagnostic.rb
@@ -439,7 +439,7 @@ def check_user_path_1 message = "" - paths.each do |p| + paths(ENV["HOMEBREW_PATH"]).each do |p| case p when "/usr/bin" unless $seen_prefix_bin @@ -609,7 +609,7 @@ def check_for_config_scripts /Applications/Server.app/Contents/...
true
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/extend/ENV.rb
@@ -26,6 +26,13 @@ def with_build_environment ensure replace(old_env) end + + def clear_sensitive_environment! + ENV.keys.each do |key| + next unless /(cookie|key|token)/i =~ key + ENV.delete key + end + end end ENV.extend(EnvActivation)
true
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/formula.rb
@@ -13,6 +13,7 @@ require "tap" require "keg" require "migrator" +require "extend/ENV" # A formula provides instructions and metadata for Homebrew to install a piece # of software. Every Homebrew formula is a {Formula}. @@ -1013,10 +1014,17 @@ def run_post_install @prefix_returns_versioned_prefix = true ...
true
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/global.rb
@@ -53,7 +53,7 @@ def raise_deprecation_exceptions? require "compat" unless ARGV.include?("--no-compat") || ENV["HOMEBREW_NO_COMPAT"] -ORIGINAL_PATHS = ENV["PATH"].split(File::PATH_SEPARATOR).map do |p| +ORIGINAL_PATHS = ENV["HOMEBREW_PATH"].split(File::PATH_SEPARATOR).map do |p| begin Pathname.new(p).expa...
true
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/test/diagnostic_spec.rb
@@ -122,8 +122,9 @@ specify "#check_user_path_3" do begin sbin = HOMEBREW_PREFIX/"sbin" - ENV["PATH"] = "#{HOMEBREW_PREFIX}/bin#{File::PATH_SEPARATOR}" + - ENV["PATH"].gsub(/(?:^|#{Regexp.escape(File::PATH_SEPARATOR)})#{Regexp.escape(sbin)}/, "") + ENV["HOMEBREW_PATH"] = + ...
true
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/test/support/helper/spec/shared_context/integration_test.rb
@@ -72,6 +72,7 @@ def brew(*args) env.merge!( "PATH" => path, + "HOMEBREW_PATH" => path, "HOMEBREW_BREW_FILE" => HOMEBREW_PREFIX/"bin/brew", "HOMEBREW_INTEGRATION_TEST" => command_id_from_args(args), "HOMEBREW_TEST_TMPDIR" => TEST_TMPDIR,
true
Other
Homebrew
brew
d02b4f321d01fbd4cd2b4c1bd76d1f06d1612126.json
Hide sensitive tokens from install/test/post. Hide these tokens to avoid malicious subprocesses e.g. sending them over the network. Also, support using these tokens with environment filtering and clear `HOMEBREW_PATH` from subprocesses to stop them sniffing it. Finally, use `HOMEBREW_PATH` to detect Homebrew’s user’s ...
Library/Homebrew/utils.rb
@@ -406,8 +406,8 @@ def nostdout end end -def paths - @paths ||= ENV["PATH"].split(File::PATH_SEPARATOR).collect do |p| +def paths(env_path = ENV["PATH"]) + @paths ||= env_path.split(File::PATH_SEPARATOR).collect do |p| begin File.expand_path(p).chomp("/") rescue ArgumentError
true
Other
Homebrew
brew
a6df701fad516a1da54ea245fb47826d47dc03b5.json
tests: reduce some noise. - Tweak the way offline skipping happens - Skip more tests that break when offline - Hide more stdout output from tests.
Library/Homebrew/dev-cmd/tests.rb
@@ -33,7 +33,12 @@ def tests ENV["HOMEBREW_DEVELOPER"] = "1" ENV["HOMEBREW_NO_COMPAT"] = "1" if ARGV.include? "--no-compat" ENV["HOMEBREW_TEST_GENERIC_OS"] = "1" if ARGV.include? "--generic" - ENV["HOMEBREW_NO_GITHUB_API"] = "1" unless ARGV.include? "--online" + + if ARGV.include? "--onli...
true
Other
Homebrew
brew
a6df701fad516a1da54ea245fb47826d47dc03b5.json
tests: reduce some noise. - Tweak the way offline skipping happens - Skip more tests that break when offline - Hide more stdout output from tests.
Library/Homebrew/test/cask/cli/style_spec.rb
@@ -81,7 +81,7 @@ end context "version" do - it "matches `HOMEBREW_RUBOCOP_VERSION`" do + it "matches `HOMEBREW_RUBOCOP_VERSION`", :needs_network do stdout, status = Open3.capture2("gem", "dependency", "rubocop-cask", "--version", HOMEBREW_RUBOCOP_CASK_VERSION, "--pipe", "--remote") ...
true
Other
Homebrew
brew
a6df701fad516a1da54ea245fb47826d47dc03b5.json
tests: reduce some noise. - Tweak the way offline skipping happens - Skip more tests that break when offline - Hide more stdout output from tests.
Library/Homebrew/test/cask/cli/uninstall_spec.rb
@@ -13,7 +13,9 @@ it "tries anyway on a non-present Cask when --force is given" do expect { - Hbc::CLI::Uninstall.run("local-caffeine", "--force") + shutup do + Hbc::CLI::Uninstall.run("local-caffeine", "--force") + end }.not_to raise_error end
true
Other
Homebrew
brew
a6df701fad516a1da54ea245fb47826d47dc03b5.json
tests: reduce some noise. - Tweak the way offline skipping happens - Skip more tests that break when offline - Hide more stdout output from tests.
Library/Homebrew/test/cmd/bundle_spec.rb
@@ -1,6 +1,6 @@ describe "brew bundle", :integration_test, :needs_test_cmd_taps do describe "check" do - it "checks if a Brewfile's dependencies are satisfied" do + it "checks if a Brewfile's dependencies are satisfied", :needs_network do setup_remote_tap "homebrew/bundle" HOMEBREW_REPOSITORY....
true
Other
Homebrew
brew
a6df701fad516a1da54ea245fb47826d47dc03b5.json
tests: reduce some noise. - Tweak the way offline skipping happens - Skip more tests that break when offline - Hide more stdout output from tests.
Library/Homebrew/test/dev-cmd/pull_spec.rb
@@ -6,9 +6,7 @@ .and be_a_failure end - it "fetches a patch from a GitHub commit or pull request and applies it" do - skip "Requires network connection." if ENV["HOMEBREW_NO_GITHUB_API"] - + it "fetches a patch from a GitHub commit or pull request and applies it", :needs_network do CoreTap.instanc...
true
Other
Homebrew
brew
a6df701fad516a1da54ea245fb47826d47dc03b5.json
tests: reduce some noise. - Tweak the way offline skipping happens - Skip more tests that break when offline - Hide more stdout output from tests.
Library/Homebrew/test/missing_formula_spec.rb
@@ -139,7 +139,7 @@ end context "::deleted_reason" do - subject { described_class.deleted_reason(formula) } + subject { described_class.deleted_reason(formula, silent: true) } before do Tap.clear_cache
true
Other
Homebrew
brew
a6df701fad516a1da54ea245fb47826d47dc03b5.json
tests: reduce some noise. - Tweak the way offline skipping happens - Skip more tests that break when offline - Hide more stdout output from tests.
Library/Homebrew/test/spec_helper.rb
@@ -61,6 +61,10 @@ skip "Python not installed." unless which("python") end + config.before(:each, :needs_network) do + skip "Requires network connection." unless ENV["HOMEBREW_TEST_ONLINE"] + end + config.around(:each) do |example| begin TEST_DIRECTORIES.each(&:mkpath)
true
Other
Homebrew
brew
e41f0bf8c8365c150935f03f3ecd14b44187b2ef.json
formula_installer: remove feature flags. We've been testing the recursive dependency check and allowing unlinked dependencies in CI for a while with no adverse consequences so enable them globally now for all users.
Library/Homebrew/formula_installer.rb
@@ -173,34 +173,22 @@ def check_install_sanity EOS end - if ENV["HOMEBREW_CHECK_RECURSIVE_VERSION_DEPENDENCIES"] - version_hash = {} - version_conflicts = Set.new - recursive_formulae.each do |f| - name = f.name - unversioned_name, = name.split("@") - version_hash[un...
false
Other
Homebrew
brew
cc634b2d50cc0e8c1e8a38196f4bcdad4e0a69b6.json
Set timeout to 10 seconds instead of retrying.
Library/Homebrew/cask/lib/hbc/system_command.rb
@@ -91,16 +91,10 @@ def write_input_to(raw_stdin) end def each_line_from(sources) - tries = 3 - loop do - selected_sources = IO.select(sources, [], [], 1) + selected_sources = IO.select(sources, [], [], 10) - if selected_sources.nil? - next unless (tries -= 1).zer...
false
Other
Homebrew
brew
824462c5c08da8a35c8b3bd5d1dedb73998c7460.json
README: Add Charlie to former maintainers.
README.md
@@ -42,7 +42,7 @@ Homebrew's lead maintainer is [Mike McQuaid](https://github.com/mikemcquaid). Homebrew's current maintainers are [Alyssa Ross](https://github.com/alyssais), [Andrew Janke](https://github.com/apjanke), [Baptiste Fontaine](https://github.com/bfontaine), [Alex Dunn](https://github.com/dunn), [FX Coude...
true
Other
Homebrew
brew
824462c5c08da8a35c8b3bd5d1dedb73998c7460.json
README: Add Charlie to former maintainers.
docs/Manpage.md
@@ -1077,7 +1077,7 @@ Homebrew's lead maintainer is Mike McQuaid. Homebrew's current maintainers are Alyssa Ross, Andrew Janke, Baptiste Fontaine, Alex Dunn, FX Coudert, ilovezfs, Josh Hagins, JCount, Misty De Meo, neutric, Tomasz Pajor, Markus Reiter, Tim Smith, Tom Schoonjans, Uladzislau Shablinski and William Woo...
true
Other
Homebrew
brew
824462c5c08da8a35c8b3bd5d1dedb73998c7460.json
README: Add Charlie to former maintainers.
manpages/brew.1
@@ -1120,7 +1120,7 @@ Homebrew\'s lead maintainer is Mike McQuaid\. Homebrew\'s current maintainers are Alyssa Ross, Andrew Janke, Baptiste Fontaine, Alex Dunn, FX Coudert, ilovezfs, Josh Hagins, JCount, Misty De Meo, neutric, Tomasz Pajor, Markus Reiter, Tim Smith, Tom Schoonjans, Uladzislau Shablinski and William Wo...
true
Other
Homebrew
brew
20ad7f9cf6e69196b224f95e9fce4b8af8a6d284.json
README: point security to HackerOne.
README.md
@@ -35,12 +35,7 @@ We explicitly welcome contributions from people who have never contributed to op A good starting point for contributing is running `brew audit --strict`with some of the packages you use (e.g. `brew audit --strict wget` if you use `wget`) and then read through the warnings, try to fix them until `bre...
false
Other
Homebrew
brew
43253ede656a93562344c8a39b7e3145ad2358fc.json
create: use GitHub metadata where available. GitHub provides a description and homepage field so let `brew create` use them where possible. Also, detect GitHub repositories based on `releases` as well as `archive`s.
Library/Homebrew/dev-cmd/create.rb
@@ -10,7 +10,8 @@ #: If `--meson` is passed, create a basic template for a Meson-style build. #: #: If `--no-fetch` is passed, Homebrew will not download <URL> to the cache and -#: will thus not add the SHA256 to the formula for you. +#: will thus not add the SHA256 to the formula for you. It will also n...
true
Other
Homebrew
brew
43253ede656a93562344c8a39b7e3145ad2358fc.json
create: use GitHub metadata where available. GitHub provides a description and homepage field so let `brew create` use them where possible. Also, detect GitHub repositories based on `releases` as well as `archive`s.
docs/Manpage.md
@@ -709,7 +709,8 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note If `--meson` is passed, create a basic template for a Meson-style build. If `--no-fetch` is passed, Homebrew will not download `URL` to the cache and - will thus not add the SHA256 to the formula for you. ...
true
Other
Homebrew
brew
43253ede656a93562344c8a39b7e3145ad2358fc.json
create: use GitHub metadata where available. GitHub provides a description and homepage field so let `brew create` use them where possible. Also, detect GitHub repositories based on `releases` as well as `archive`s.
manpages/brew.1
@@ -729,7 +729,7 @@ Generate a formula for the downloadable file at \fIURL\fR and open it in the edi If \fB\-\-autotools\fR is passed, create a basic template for an Autotools\-style build\. If \fB\-\-cmake\fR is passed, create a basic template for a CMake\-style build\. If \fB\-\-meson\fR is passed, create a basic te...
true
Other
Homebrew
brew
3f8722c971cedf8b2c66d918fc4dd608bf439009.json
audit: allow skipping audit methods. Add `--only` and `--except` methods which can be used to selectively enable or disable audit groups.
Library/Homebrew/dev-cmd/audit.rb
@@ -1,4 +1,4 @@ -#: * `audit` [`--strict`] [`--fix`] [`--online`] [`--new-formula`] [`--display-cop-names`] [`--display-filename`] [<formulae>]: +#: * `audit` [`--strict`] [`--fix`] [`--online`] [`--new-formula`] [`--display-cop-names`] [`--display-filename`] [`--only=`<method>|`--except=`<method] [<formulae>]: #: ...
true
Other
Homebrew
brew
3f8722c971cedf8b2c66d918fc4dd608bf439009.json
audit: allow skipping audit methods. Add `--only` and `--except` methods which can be used to selectively enable or disable audit groups.
Library/Homebrew/extend/os/mac/formula_cellar_checks.rb
@@ -67,7 +67,7 @@ def check_linkage checker = LinkageChecker.new(keg, formula) return unless checker.broken_dylibs? - audit_check_output <<-EOS.undent + problem_if_output <<-EOS.undent The installation was broken. Broken dylib links found: #{checker.broken_dylibs.to_a * "\n ...
true
Other
Homebrew
brew
3f8722c971cedf8b2c66d918fc4dd608bf439009.json
audit: allow skipping audit methods. Add `--only` and `--except` methods which can be used to selectively enable or disable audit groups.
Library/Homebrew/formula_cellar_checks.rb
@@ -154,17 +154,17 @@ def check_elisp_root(share, name) end def audit_installed - audit_check_output(check_manpages) - audit_check_output(check_infopages) - audit_check_output(check_jars) - audit_check_output(check_non_libraries) - audit_check_output(check_non_executables(formula.bin)) - audit...
true
Other
Homebrew
brew
3f8722c971cedf8b2c66d918fc4dd608bf439009.json
audit: allow skipping audit methods. Add `--only` and `--except` methods which can be used to selectively enable or disable audit groups.
Library/Homebrew/formula_installer.rb
@@ -858,15 +858,15 @@ def pour tab.write end - def audit_check_output(output) + def problem_if_output(output) return unless output opoo output @show_summary_heading = true end def audit_installed - audit_check_output(check_env_path(formula.bin)) - audit_check_output(check_env_pa...
true
Other
Homebrew
brew
3f8722c971cedf8b2c66d918fc4dd608bf439009.json
audit: allow skipping audit methods. Add `--only` and `--except` methods which can be used to selectively enable or disable audit groups.
Library/Homebrew/test/dev-cmd/audit_spec.rb
@@ -303,33 +303,33 @@ class Foo < AmazonWebServicesFormula end end - describe "#audit_line" do + describe "#line_problems" do specify "pkgshare" do fa = formula_auditor "foo", <<-EOS.undent, strict: true class Foo < Formula url "http://example.com/foo-1.0.tgz" end ...
true
Other
Homebrew
brew
3f8722c971cedf8b2c66d918fc4dd608bf439009.json
audit: allow skipping audit methods. Add `--only` and `--except` methods which can be used to selectively enable or disable audit groups.
docs/Manpage.md
@@ -606,7 +606,7 @@ With `--verbose` or `-v`, many commands print extra debugging information. Note ## DEVELOPER COMMANDS - * `audit` [`--strict`] [`--fix`] [`--online`] [`--new-formula`] [`--display-cop-names`] [`--display-filename`] [`formulae`]: + * `audit` [`--strict`] [`--fix`] [`--online`] [`--new-formula`...
true
Other
Homebrew
brew
3f8722c971cedf8b2c66d918fc4dd608bf439009.json
audit: allow skipping audit methods. Add `--only` and `--except` methods which can be used to selectively enable or disable audit groups.
manpages/brew.1
@@ -631,7 +631,7 @@ Print the version number of Homebrew to standard output and exit\. .SH "DEVELOPER COMMANDS" . .TP -\fBaudit\fR [\fB\-\-strict\fR] [\fB\-\-fix\fR] [\fB\-\-online\fR] [\fB\-\-new\-formula\fR] [\fB\-\-display\-cop\-names\fR] [\fB\-\-display\-filename\fR] [\fIformulae\fR] +\fBaudit\fR [\fB\-\-strict\...
true
Other
Homebrew
brew
14a7ef591b68ebb4d901c2f2a9a1553be0e7af03.json
gpg_spec: switch structure to if/else instead of rescue
Library/Homebrew/test/gpg_spec.rb
@@ -12,11 +12,13 @@ shutup do subject.create_test_key(dir) + gpg = subject::GPG_EXECUTABLE + @version = Utils.popen_read(gpg, "--version")[/\d\.\d/, 0] end - begin + if @version.to_s.start_with?("2.1") expect(dir/".gnupg/pubring.kbx").to be_fil...
false
Other
Homebrew
brew
57b230dd5c9ff01f59b2c6e0f8c527bbc95b9dce.json
audit: fix core formula alias check. Was missing a formula object being passed.
Library/Homebrew/dev-cmd/audit.rb
@@ -476,7 +476,7 @@ def audit_deps end if @@aliases.include?(dep.name) && - (core_formula? || !dep_f.versioned_formula?) + (dep_f.core_formula? || !dep_f.versioned_formula?) problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_na...
false
Other
Homebrew
brew
573aeff11513a679577994cce84d31011090902b.json
Add Skylake to Linux hardware list
Library/Homebrew/extend/os/linux/hardware/cpu.rb
@@ -49,6 +49,8 @@ def family :haswell when 0x3d, 0x47, 0x4f, 0x56 :broadwell + when 0x5e + :skylake when 0x8e :kabylake else
false
Other
Homebrew
brew
c3b309e7957d38952a85b4d320ac73112d2733af.json
java_requirement: Add newline to failure message Signed-off-by: Bob W. Hogg <rwhogg@linux.com>
Library/Homebrew/requirements/java_requirement.rb
@@ -18,7 +18,7 @@ def initialize(tags) def message version_string = " #{@version}" if @version - s = "Java#{version_string} is required to install this formula." + s = "Java#{version_string} is required to install this formula.\n" s += super s end
false
Other
Homebrew
brew
ae97a9c34eff45766be9af76bd79057c4acae77f.json
docs: use long flags.
docs/FAQ.md
@@ -174,11 +174,11 @@ If it’s been a while, bump it with a “bump” comment. Sometimes we miss req Yes! It’s easy! Just `brew edit <formula>`. You don’t have to submit modifications back to `homebrew/core`, just edit the formula as you personally need it and `brew install`. As a bonus `brew update` will merge your chang...
true
Other
Homebrew
brew
ae97a9c34eff45766be9af76bd79057c4acae77f.json
docs: use long flags.
docs/Formula-Cookbook.md
@@ -90,7 +90,7 @@ Try to summarize from the [`homepage`](http://www.rubydoc.info/github/Homebrew/b ### Check the build system ```sh -brew install -i foo +brew install --interactive foo ``` You’re now at a new prompt with the tarball extracted to a temporary sandbox.
true
Other
Homebrew
brew
18c7254ecddc67851e9aa087eabd203b336d62e8.json
missing_formula: pillow lives in homebrew/science
Library/Homebrew/missing_formula.rb
@@ -31,7 +31,7 @@ def blacklisted_reason(name) #{Formatter.url("https://pip.readthedocs.io/en/stable/installing/")} EOS when "pil" then <<-EOS.undent - Instead of PIL, consider `pip install pillow` or `brew install Homebrew/python/pillow`. + Instead of PIL, consider `p...
false
Other
Homebrew
brew
7c048b6f71b031ab8ee1289a70b51cef24408dcc.json
cask: remove pre_bug_report links
Library/Homebrew/cask/lib/hbc/utils.rb
@@ -4,8 +4,7 @@ require "hbc/utils/file" -PREBUG_URL = "https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md".freeze -ISSUES_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".freeze +BUG_REPORTS_URL = "https://github.com/caskroom/homebrew-cask#reporting-bugs".fr...
true
Other
Homebrew
brew
7c048b6f71b031ab8ee1289a70b51cef24408dcc.json
cask: remove pre_bug_report links
Library/Homebrew/test/cask/dsl_spec.rb
@@ -26,8 +26,6 @@ .* Unexpected method 'future_feature' called on Cask unexpected-method-cask\\. .* - https://github.com/caskroom/homebrew-cask/blob/master/doc/reporting_bugs/pre_bug_report.md - .* https://github.com/caskroom/homebrew-cask#reporting-bugs EOS
true
Other
Homebrew
brew
f5321d1b0d8f24cb2d4773c03f57f1c643fc775f.json
Remove osmium from blacklisted formulas
Library/Homebrew/missing_formula.rb
@@ -64,10 +64,6 @@ def blacklisted_reason(name) and then follow the tutorial: #{Formatter.url("https://github.com/technomancy/leiningen/blob/stable/doc/TUTORIAL.md")} EOS - when "osmium" then <<-EOS.undent - The creator of Osmium requests that it not be packaged and th...
true
Other
Homebrew
brew
f5321d1b0d8f24cb2d4773c03f57f1c643fc775f.json
Remove osmium from blacklisted formulas
Library/Homebrew/test/missing_formula_spec.rb
@@ -88,14 +88,6 @@ it { is_expected.to be_blacklisted } end - context "osmium" do - %w[osmium Osmium].each do |s| - subject { s } - - it { is_expected.to be_blacklisted } - end - end - context "gfortran" do subject { "gfortran" }
true
Other
Homebrew
brew
90c6d5f40a950178a5c1fae0fae9f39abcf3ffb4.json
upgrade: perform rename migrations when needed.
Library/Homebrew/cmd/upgrade.rb
@@ -88,6 +88,7 @@ def upgrade end formulae_to_install.each do |f| + Migrator.migrate_if_needed(f) upgrade_formula(f) next unless ARGV.include?("--cleanup") next unless f.installed?
false
Other
Homebrew
brew
61ebc128af718dca9d2a1dda482e29d30f54e72f.json
reinstall: perform rename migrations when needed.
Library/Homebrew/cmd/reinstall.rb
@@ -15,6 +15,7 @@ def reinstall onoe "#{f.full_name} is pinned. You must unpin it to reinstall." next end + Migrator.migrate_if_needed(f) reinstall_formula(f) end end
false
Other
Homebrew
brew
d82522060e62c082fc54f2ee8ea30c46e004917f.json
install: perform rename migrations when needed.
Library/Homebrew/cmd/install.rb
@@ -199,7 +199,10 @@ def install perform_preinstall_checks - formulae.each { |f| install_formula(f) } + formulae.each do |f| + Migrator.migrate_if_needed(f) + install_formula(f) + end rescue FormulaClassUnavailableError => e # Need to rescue before `FormulaUnavailable...
false
Other
Homebrew
brew
5d1f4dd531f9e88c762f2f65e73e67511798c62d.json
migrator: add more helper methods. Add methods to determine if a migration is needed and perform it if so (and no-op if not). Additionally, make `ARGV.force?` get passed as a parameter so it can be overridden without requiring users to pass `—force`.
Library/Homebrew/migrator.rb
@@ -83,7 +83,26 @@ def initialize(formula, tap) # path to newname keg that will be linked if old_linked_keg isn't nil attr_reader :new_linked_keg_record - def initialize(formula) + def self.needs_migration?(formula) + oldname = formula.oldname + return false unless oldname + oldname_rack = HOMEBREW_C...
false
Other
Homebrew
brew
45357ef0dd2bfc0bf8d957fd890e030fd9f7cf6a.json
Fix handling of tap migrations to new cask names. Need to check for two `/`s rather than one.
Library/Homebrew/migrator.rb
@@ -122,14 +122,21 @@ def fix_tabs end def from_same_taps? + new_tap = if old_tap + if migrate_tap = old_tap.tap_migrations[formula.oldname] + new_tap_user, new_tap_repo, = migrate_tap.split("/") + "#{new_tap_user}/#{new_tap_repo}" + end + end + if formula.tap == old_tap ...
true
Other
Homebrew
brew
45357ef0dd2bfc0bf8d957fd890e030fd9f7cf6a.json
Fix handling of tap migrations to new cask names. Need to check for two `/`s rather than one.
Library/Homebrew/missing_formula.rb
@@ -105,10 +105,14 @@ def tap_migration_reason(name) message = nil Tap.each do |old_tap| - new_tap_name = old_tap.tap_migrations[name] - next unless new_tap_name + new_tap = old_tap.tap_migrations[name] + next unless new_tap + + new_tap_user, new_tap_repo...
true
Other
Homebrew
brew
e7554b0b3f71e0658e52e8dea974c511bc58aeba.json
audit: Fix cctools invocation check regular expression. Additionally, ignore the cctools formula itself, since it obviously needs to check cctools invocations.
Library/Homebrew/dev-cmd/audit.rb
@@ -1185,7 +1185,7 @@ def audit_line(line, _lineno) problem "'fails_with :llvm' is now a no-op so should be removed" end - if line =~ /system\s+['"](otool)|(install_name_tool)|(lipo)/ + if line =~ /system\s+['"](otool|install_name_tool|lipo)/ && formula.name != "cctools" problem "Use ruby-mac...
false
Other
Homebrew
brew
51ca9025a5c094d048d248f5fa0e4bf8990bc421.json
formula_installer_spec: add default formula test. Test the situation where a requirement is satisfied by a non-formula but the `default_formula` is also installed.
Library/Homebrew/test/formula_installer_spec.rb
@@ -159,6 +159,13 @@ class #{Formulary.class_s(dep_name)} < Formula it { is_expected.to be false } end + context "it returns false when requirement is satisfied but default formula is installed" do + let(:satisfied?) { true } + let(:satisfied_by_formula?) { false } + let(:installed?) { t...
false
Other
Homebrew
brew
89f3b6d6a6ce0b1ed993a0988989fc9ac4284fa1.json
update-test: Use git fetch --tags --depth=1 Use git fetch --tags --depth=1 to fetch fewer commits.
Library/Homebrew/dev-cmd/update-test.rb
@@ -36,7 +36,7 @@ def update_test previous_tag = Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1] unless previous_tag - safe_system "git", "fetch", "--tags" + safe_system "git", "fetch", "--tags", "--depth=1" previous_tag = Utils.popen...
false
Other
Homebrew
brew
c5bac087b34e90933acca1ee0371dd947cfa97a1.json
update latest versions of Xcode for 10.11 & 10.12
Library/Homebrew/os/mac.rb
@@ -201,6 +201,10 @@ def preferred_arch "7.3" => { clang: "7.3", clang_build: 703 }, "7.3.1" => { clang: "7.3", clang_build: 703 }, "8.0" => { clang: "8.0", clang_build: 800 }, + "8.1" => { clang: "8.0", clang_build: 800 }, + "8.2" => { clang: "8.0", clang_build: 800 }, + "8....
true
Other
Homebrew
brew
c5bac087b34e90933acca1ee0371dd947cfa97a1.json
update latest versions of Xcode for 10.11 & 10.12
Library/Homebrew/os/mac/xcode.rb
@@ -16,13 +16,13 @@ def latest_version when "10.8" then "5.1.1" when "10.9" then "6.2" when "10.10" then "7.2.1" - when "10.11" then "8.2" - when "10.12" then "8.2" + when "10.11" then "8.2.1" + when "10.12" then "8.3" else raise "macOS '#{Mac...
true
Other
Homebrew
brew
c5bac087b34e90933acca1ee0371dd947cfa97a1.json
update latest versions of Xcode for 10.11 & 10.12
docs/Xcode.md
@@ -11,8 +11,8 @@ Tools available for your platform: | 10.8 | 5.1.1 | April 2014 | | 10.9 | 6.2 | 6.2 | | 10.10 | 7.2.1 | 7.2 | -| 10.11 | 8.0 | 7.3 | -| 10.12 | 8.0 | 8.0 | +| 10.11 | 8.2.1 | 8.2 | +| 10.12 | 8.3 | 8.3 ...
true
Other
Homebrew
brew
c3bf9bda58aba514259d45972a5172e8801d5c65.json
update-test: improve error handling. Fail if the start or end commit are missing and retry finding the previous tag by fetching all tags if they are missing. This should fix CI on the current Homebrew/brew `master` branch. Closes #2404.
Library/Homebrew/dev-cmd/update-test.rb
@@ -33,12 +33,24 @@ def update_test elsif date = ARGV.value("before") Utils.popen_read("git", "rev-list", "-n1", "--before=#{date}", "origin/master").chomp elsif ARGV.include?("--to-tag") - Utils.popen_read("git", "tag", "--list", "--sort=-version:refname").lines[1].chomp + previous_tag = + ...
false
Other
Homebrew
brew
1f89a332132d8c33e6c9d86d90dbc79005256fce.json
ruby_requirement: fix path prepend
Library/Homebrew/requirements/ruby_requirement.rb
@@ -11,7 +11,7 @@ def initialize(tags) satisfy(build_env: false) { new_enough_ruby } env do - ENV.prepend_path "PATH", new_enough_ruby + ENV.prepend_path "PATH", new_enough_ruby.dirname end def message
false
Other
Homebrew
brew
996dcdee2cacdfee90602387d5c5142d749f00de.json
Add pinned version to outdated json output The structure should be consistent, so there are always pinned and pinned_version fields even if there are no pinned versions for a given formula.
Library/Homebrew/cmd/outdated.rb
@@ -88,7 +88,9 @@ def print_outdated_json(formulae) json << { name: f.full_name, installed_versions: outdated_versions.collect(&:to_s), - current_version: current_version } + current_version: current_version, + pinned: f.pinned?, + pi...
true
Other
Homebrew
brew
996dcdee2cacdfee90602387d5c5142d749f00de.json
Add pinned version to outdated json output The structure should be consistent, so there are always pinned and pinned_version fields even if there are no pinned versions for a given formula.
Library/Homebrew/test/cmd/outdated_spec.rb
@@ -38,4 +38,50 @@ .and be_a_success end end + + context "json output" do + it "includes pinned version in the json output" do + setup_test_formula "testball" + (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath + + shutup do + expect { brew "pin", "testball" }.to be_a_success + ...
true
Other
Homebrew
brew
70446d9112c0d42ca1ab469af07716bb7281169e.json
Add pinned version to outdated output
Library/Homebrew/cmd/outdated.rb
@@ -64,7 +64,9 @@ def print_outdated(formulae) "#{full_name} (#{kegs.map(&:version).join(", ")})" end.join(", ") - puts "#{outdated_versions} < #{current_version}" + pinned_version = " [pinned at #{f.pinned_version}]" if f.pinned? + + puts "#{outdated_versions} < #{current_ver...
true
Other
Homebrew
brew
70446d9112c0d42ca1ab469af07716bb7281169e.json
Add pinned version to outdated output
Library/Homebrew/test/cmd/outdated_spec.rb
@@ -22,4 +22,20 @@ .and be_a_success end end + + context "pinned formula, verbose output" do + it "prints out the pinned version" do + setup_test_formula "testball" + (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath + + shutup do + expect { brew "pin", "testball" }.to be_a_succes...
true
Other
Homebrew
brew
755d43d46dc20b9e646909e08de482141de83777.json
Add test for verbose brew outdated output Split the tests up into quiet and verbose output with contexts.
Library/Homebrew/test/cmd/outdated_spec.rb
@@ -1,11 +1,25 @@ describe "brew outdated", :integration_test do - it "prints outdated Formulae" do - setup_test_formula "testball" - (HOMEBREW_CELLAR/"testball/0.0.1/foo").mkpath + context "quiet output" do + it "prints outdated Formulae" do + setup_test_formula "testball" + (HOMEBREW_CELLAR/"tes...
false