diff --git a/Library/Homebrew/cmd/--config.rb b/Library/Homebrew/cmd/--config.rb index 63c27fd3b8..66b9ef756e 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