diff options
| author | Xu Cheng | 2016-03-06 15:01:54 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-04-02 21:51:36 +0800 |
| commit | 2bb30fc5f0ab4146190e65d017ea0ad4eac40dbf (patch) | |
| tree | 7cccde326b58f56cb5ede191c17ce04acba98a20 /Library/Homebrew/utils.rb | |
| parent | 5bb8e8985d8b26531767be500a59f9761aac1c38 (diff) | |
| download | brew-2bb30fc5f0ab4146190e65d017ea0ad4eac40dbf.tar.bz2 | |
--version/config: show core tap information
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" |
