aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2017-01-02 17:07:55 +0000
committerGitHub2017-01-02 17:07:55 +0000
commit814a5de7f74f3012f364aef978394955cbef7ac5 (patch)
treea0b53457a44cb252168c2fa18dc89bfabde1b229 /Library
parente84e4b5566ac9211481af2ab7c74cd7ad617d958 (diff)
parent79f9896d2ffd03819236318c9f0742d40f1826ac (diff)
downloadbrew-814a5de7f74f3012f364aef978394955cbef7ac5.tar.bz2
Merge pull request #1765 from MikeMcQuaid/force-bottle-or-later
bottles: --force-bottle feigns or_later.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/fetch.rb5
-rw-r--r--Library/Homebrew/cmd/install.rb8
-rw-r--r--Library/Homebrew/extend/os/mac/utils/bottles.rb2
3 files changed, 9 insertions, 6 deletions
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb
index f92ef03b2..820a27e31 100644
--- a/Library/Homebrew/cmd/fetch.rb
+++ b/Library/Homebrew/cmd/fetch.rb
@@ -18,8 +18,9 @@
#: If `--build-from-source` is passed, download the source rather than a
#: bottle.
#:
-#: If `--force-bottle` is passed, download a bottle if it exists for the current
-#: version of macOS, even if it would not be used during installation.
+#: If `--force-bottle` is passed, download a bottle if it exists for the
+#: current or newest version of macOS, even if it would not be used during
+#: installation.
require "formula"
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb
index 700cd9c3d..6f578caf6 100644
--- a/Library/Homebrew/cmd/install.rb
+++ b/Library/Homebrew/cmd/install.rb
@@ -32,10 +32,10 @@
#: passed, then both <formula> and the dependencies installed as part of this process
#: are built from source even if bottles are available.
#:
-# Hidden developer option:
-# If `--force-bottle` is passed, install from a bottle if it exists
-# for the current version of macOS, even if custom options are given.
-#
+#: If `--force-bottle` is passed, install from a bottle if it exists for the
+#: current or newest version of macOS, even if it would not normally be used
+#: for installation.
+#:
#: If `--devel` is passed, and <formula> defines it, install the development version.
#:
#: If `--HEAD` is passed, and <formula> defines it, install the HEAD version,
diff --git a/Library/Homebrew/extend/os/mac/utils/bottles.rb b/Library/Homebrew/extend/os/mac/utils/bottles.rb
index 18312c9fa..c54e4e5b7 100644
--- a/Library/Homebrew/extend/os/mac/utils/bottles.rb
+++ b/Library/Homebrew/extend/os/mac/utils/bottles.rb
@@ -49,6 +49,8 @@ module Utils
if key.to_s.end_with?("_or_later")
later_tag = key.to_s[/(\w+)_or_later$/, 1].to_sym
MacOS::Version.from_symbol(later_tag) <= tag_version
+ elsif ARGV.force_bottle?
+ true
end
end
end