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/cmd/config.rb | |
| parent | 5bb8e8985d8b26531767be500a59f9761aac1c38 (diff) | |
| download | brew-2bb30fc5f0ab4146190e65d017ea0ad4eac40dbf.tar.bz2 | |
--version/config: show core tap information
Diffstat (limited to 'Library/Homebrew/cmd/config.rb')
| -rw-r--r-- | Library/Homebrew/cmd/config.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/config.rb b/Library/Homebrew/cmd/config.rb index 67c6dd9f4..7f8416ce7 100644 --- a/Library/Homebrew/cmd/config.rb +++ b/Library/Homebrew/cmd/config.rb @@ -1,6 +1,7 @@ require "hardware" require "software_spec" require "rexml/document" +require "tap" module Homebrew def config @@ -57,6 +58,18 @@ module Homebrew Homebrew.git_origin || "(none)" end + def core_tap_head + CoreTap.instance.git_head || "(none)" + end + + def core_tap_last_commit + CoreTap.instance.git_last_commit || "never" + end + + def core_tap_origin + CoreTap.instance.remote || "(none)" + end + def describe_path(path) return "N/A" if path.nil? realpath = path.realpath @@ -144,6 +157,13 @@ module Homebrew f.puts "ORIGIN: #{origin}" f.puts "HEAD: #{head}" f.puts "Last commit: #{last_commit}" + if CoreTap.instance.installed? + f.puts "Core tap ORIGIN: #{core_tap_origin}" + f.puts "Core tap HEAD: #{core_tap_head}" + f.puts "Core tap last commit: #{core_tap_last_commit}" + else + f.puts "Core tap: N/A" + end f.puts "HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}" f.puts "HOMEBREW_REPOSITORY: #{HOMEBREW_REPOSITORY}" f.puts "HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}" |
