aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-06-26 13:01:23 +0100
committerMax Howell2009-06-26 13:01:23 +0100
commit6ee7a116c26511a47fb7ba5c7e629eb28576bd58 (patch)
tree04c660f275d6d6ce0604c3d4f30a1e3c64b630a5
parent3fa628e7b1c17896ed59eef93cfbddf4abcc288a (diff)
downloadbrew-6ee7a116c26511a47fb7ba5c7e629eb28576bd58.tar.bz2
No more "cwd doesn't exist" messages
-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