aboutsummaryrefslogtreecommitdiffstats
path: root/bin/brew
diff options
context:
space:
mode:
authorMax Howell2009-06-26 13:01:23 +0100
committerMax Howell2009-06-26 13:01:23 +0100
commit7a24fc4a7abadd2ffd9ddc62741fa8a5fc090e10 (patch)
tree466444cd138e774026e4ce1db488400bf77b739f /bin/brew
parentb90a8a4f7368b18fdfeb71460c51b5ae43f50b09 (diff)
downloadhomebrew-7a24fc4a7abadd2ffd9ddc62741fa8a5fc090e10.tar.bz2
No more "cwd doesn't exist" messages
Diffstat (limited to 'bin/brew')
-rwxr-xr-xbin/brew3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/brew b/bin/brew
index 29058a000..570ad265d 100755
--- a/bin/brew
+++ b/bin/brew
@@ -5,6 +5,9 @@ require 'pathname'
$:.unshift Pathname.new(__FILE__).dirname.parent.realpath+'Library'+'Homebrew'
require 'env'
+# often causes Ruby to throw exception ffs
+Dir.chdir '/' unless File.exist? Dir.getwd
+
def prune
n=0
dirs=Array.new