diff options
author | The Bundler Bot <bot@bundler.io> | 2017-12-11 23:36:21 +0000 |
---|---|---|
committer | The Bundler Bot <bot@bundler.io> | 2017-12-11 23:36:21 +0000 |
commit | 060e2f953c8f08dd7bed9711863e6341eebe5fe2 (patch) | |
tree | 3e3e5a41e3a8febc2ba77aa5aad8a619e0698402 /lib | |
parent | 6bb5666bec29fba0c56840ca0903935eace9162a (diff) | |
parent | cbf30a8a8fa00de33254f96bd290e67815f75998 (diff) | |
download | bundler-060e2f953c8f08dd7bed9711863e6341eebe5fe2.tar.gz |
Auto merge of #6207 - bundler:colby/init-gemfile-path-child, r=segiddins
Let users generate gemfiles inside paths whos parent contains a Gemfile
### What was the end-user problem that led to this PR?
Users are unable to generate a new Gemfile with `bundle init` if there is a Gemfile in any
parent folder.
Closes #6205
### What is your fix for the problem, implemented in this PR?
Don't use `SharedHelpers.default_gemfile` as that searches up the paths for a Gemfile. Instead only check the current directory.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/cli/init.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/bundler/cli/init.rb b/lib/bundler/cli/init.rb index 50e01f54fb..fa53e7c74b 100644 --- a/lib/bundler/cli/init.rb +++ b/lib/bundler/cli/init.rb @@ -36,11 +36,7 @@ module Bundler private def gemfile - @gemfile ||= begin - Bundler.default_gemfile - rescue GemfileNotFound - Bundler.feature_flag.init_gems_rb? ? "gems.rb" : "Gemfile" - end + @gemfile ||= Bundler.feature_flag.init_gems_rb? ? "gems.rb" : "Gemfile" end end end |