diff options
| author | Xu Cheng | 2015-09-01 16:53:55 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-09-02 15:24:52 +0800 |
| commit | 8d5c445daa7520c75f7b3c2a132eda2ec86e0727 (patch) | |
| tree | debeeb71b745c4c952bdd80b82e5bf2ff6f38897 | |
| parent | 71f794260b8ea0312b5a733095e2856c9a4719bb (diff) | |
| download | brew-8d5c445daa7520c75f7b3c2a132eda2ec86e0727.tar.bz2 | |
homebrew_version_string: check git available
| -rw-r--r-- | Library/Homebrew/utils.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Library/Homebrew/utils.rb b/Library/Homebrew/utils.rb index 867c747f8..1fa081419 100644 --- a/Library/Homebrew/utils.rb +++ b/Library/Homebrew/utils.rb @@ -162,8 +162,7 @@ module Homebrew end def self.homebrew_version_string - pretty_revision = git_short_head - if pretty_revision + if Utils.git_available? && (pretty_revision = git_short_head) last_commit = git_last_commit_date "#{HOMEBREW_VERSION} (git revision #{pretty_revision}; last commit #{last_commit})" else |
