diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/--config.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/--config.rb b/Library/Homebrew/cmd/--config.rb index 63c27fd3b..66b9ef756 100644 --- a/Library/Homebrew/cmd/--config.rb +++ b/Library/Homebrew/cmd/--config.rb @@ -30,7 +30,9 @@ module Homebrew extend self end def sha - sha = `cd #{HOMEBREW_REPOSITORY} && git rev-parse --verify HEAD 2> /dev/null`.chomp + sha = HOMEBREW_REPOSITORY.cd do + `git rev-parse --verify -q HEAD 2>/dev/null`.chomp + end if sha.empty? then "(none)" else sha end end |
