Skip to content

Commit

Permalink
Merge pull request #599 from MikeMcQuaid/improve-outdated
Browse files Browse the repository at this point in the history
cmd/brew-bundle: improve outdated messaging.
  • Loading branch information
MikeMcQuaid committed Dec 4, 2019
2 parents aced125 + 18a3327 commit dd19517
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/brew-bundle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@
#: --taps List tap dependencies.
#: --mas List Mac App Store dependencies.

HOMEBREW_NEEDED_VERSION = "2.1.0"
if !defined?(HOMEBREW_VERSION) || !HOMEBREW_VERSION ||
Version.new(HOMEBREW_VERSION) < Version.new("2.1.0")
odie "Your Homebrew is outdated. Please run `brew update`."
Version.new(HOMEBREW_VERSION) < Version.new(HOMEBREW_NEEDED_VERSION)
odie <<~EOS
Your Homebrew is outdated (need >=#{HOMEBREW_NEEDED_VERSION}, found #{HOMEBREW_VERSION} at #{HOMEBREW_PREFIX}).
Please run `brew update`.
EOS
end

BUNDLE_ROOT = File.expand_path "#{File.dirname(__FILE__)}/.."
Expand Down

0 comments on commit dd19517

Please sign in to comment.