aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2011-03-13 13:42:32 +0000
committerMax Howell2011-03-13 13:42:32 +0000
commit53f83ccec7de51665e080556c88ca91a9e35fa3e (patch)
tree2ec38e1eacdf579df0168c2eee548a7e73ef8fbd
parent73c7a3aa1ba5b46eed026e4c07aa7f1930222143 (diff)
downloadhomebrew-53f83ccec7de51665e080556c88ca91a9e35fa3e.tar.bz2
Move the Dir.getwd after help
Because we should always be able to help. And I've checked, it works fine.
-rwxr-xr-xbin/brew9
1 files changed, 5 insertions, 4 deletions
diff --git a/bin/brew b/bin/brew
index 2529693d6..3569560ae 100755
--- a/bin/brew
+++ b/bin/brew
@@ -1,10 +1,6 @@
#!/usr/bin/ruby
# -*- coding: utf-8 -*-
-# Many Pathname operations use getwd when they shouldn't, and then throw
-# odd exceptions. Reduce our support burden by showing a user-friendly error.
-Dir.getwd rescue abort "The current working directory doesn't exist, cannot proceed."
-
HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] = File.expand_path(__FILE__)
require 'pathname'
@@ -41,6 +37,11 @@ if MACOS_VERSION < 10.5
EOABORT
end
+# Many Pathname operations use getwd when they shouldn't, and then throw
+# odd exceptions. Reduce our support burden by showing a user-friendly error.
+Dir.getwd rescue abort "The current working directory doesn't exist, cannot proceed."
+
+
def require? path
require path.to_s.chomp
rescue LoadError => e