diff options
author | Andre Medeiros <me@andremedeiros.info> | 2014-09-13 19:16:15 +0200 |
---|---|---|
committer | Andre Medeiros <me@andremedeiros.info> | 2014-09-13 19:16:15 +0200 |
commit | b0e13370569ddd289eedd15f9bfe84c5643bb70a (patch) | |
tree | 69675994d9e872cddf2f1b8410f7cad6a7d145d2 | |
parent | 0823e10ea01d36f6bdb764cc8754bda7236737e9 (diff) | |
download | bundler-b0e13370569ddd289eedd15f9bfe84c5643bb70a.tar.gz |
Fix the gemfile locating logic.
-rw-r--r-- | lib/bundler/shared_helpers.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index b1d8d73f3a..fc0436842c 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -91,12 +91,11 @@ module Bundler end # otherwise return the Gemfile if it's there - filename = ['Gemfile', 'gems.rb'].find do |file| + ['Gemfile', 'gems.rb'].each do |file| path = File.join(current, file) - File.file?(path) + return path if File.file?(path) end - return filename unless filename.nil? current, previous = File.expand_path("..", current), current end end |