Move the Dir.getwd after help
Because we should always be able to help. And I've checked, it works fine.
This commit is contained in:
parent
ec9cbc6466
commit
69361de450
9
bin/brew
9
bin/brew
@ -1,10 +1,6 @@
|
|||||||
#!/usr/bin/ruby
|
#!/usr/bin/ruby
|
||||||
# -*- coding: utf-8 -*-
|
# -*- 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__)
|
HOMEBREW_BREW_FILE = ENV['HOMEBREW_BREW_FILE'] = File.expand_path(__FILE__)
|
||||||
|
|
||||||
require 'pathname'
|
require 'pathname'
|
||||||
@ -41,6 +37,11 @@ if MACOS_VERSION < 10.5
|
|||||||
EOABORT
|
EOABORT
|
||||||
end
|
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
|
def require? path
|
||||||
require path.to_s.chomp
|
require path.to_s.chomp
|
||||||
rescue LoadError => e
|
rescue LoadError => e
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user