aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorJack Nagel2011-12-28 19:30:34 -0600
committerJack Nagel2011-12-28 19:54:59 -0600
commit647e7f11267ca101500081c1203bf31af7ed7f97 (patch)
treed75387a42a43b254dc6dd996f7821ab2f4b12c60 /Library
parentd83076c07ed8dac3d629d4532e5f4e8d98a9a793 (diff)
downloadbrew-647e7f11267ca101500081c1203bf31af7ed7f97.tar.bz2
config: prettify sha method
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/--config.rb4
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