aboutsummaryrefslogtreecommitdiffstats
path: root/Library/brew.rb
diff options
context:
space:
mode:
authorJack Nagel2014-05-04 09:14:37 -0500
committerJack Nagel2014-05-04 09:15:34 -0500
commit4f81fe9cf7be1c720442955eb2a76b57772b09fc (patch)
tree228fdd67ac8743438f0ec3e055e1715887118e8d /Library/brew.rb
parent8ce8f887497b3e5f7fc3ae8335ecbcc9294a1985 (diff)
downloadhomebrew-4f81fe9cf7be1c720442955eb2a76b57772b09fc.tar.bz2
Don't attempt to require nil
Fixes #28942.
Diffstat (limited to 'Library/brew.rb')
-rwxr-xr-xLibrary/brew.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/brew.rb b/Library/brew.rb
index 280333943..6d7eb3d6f 100755
--- a/Library/brew.rb
+++ b/Library/brew.rb
@@ -108,7 +108,7 @@ begin
ENV["HOMEBREW_#{e}"] = Object.const_get("HOMEBREW_#{e}").to_s
end
exec "brew-#{cmd}", *ARGV
- elsif require? which("brew-#{cmd}.rb")
+ elsif (path = which("brew-#{cmd}.rb")) && require?(path)
exit Homebrew.failed? ? 1 : 0
else
onoe "Unknown command: #{cmd}"