diff options
Diffstat (limited to 'Library/Homebrew/utils.rb')
| -rw-r--r-- | Library/Homebrew/utils.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 98ebcc9c8..0675cce5d 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -229,6 +229,18 @@ module Homebrew end end + def self.core_tap_version_string + require "tap" + tap = CoreTap.instance + return "N/A" unless tap.installed? + if pretty_revision = tap.git_short_head + last_commit = tap.git_last_commit_date + "(git revision #{pretty_revision}; last commit #{last_commit})" + else + "(no git repository)" + end + end + def self.install_gem_setup_path!(gem, version = nil, executable = gem) require "rubygems" |
