Work even if the working directory doesn't exist

This commit is contained in:
Max Howell 2009-07-10 00:57:27 +01:00
parent 3d140f5a57
commit 3bdeac3649

View File

@ -6,7 +6,7 @@ $:.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
Dir.chdir '/' unless File.directory? ENV['PWD']
def prune
n=0