summaryrefslogtreecommitdiff
path: root/lib/bundler/shared_helpers.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/shared_helpers.rb')
-rw-r--r--lib/bundler/shared_helpers.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb
index e8f9bfd610..960a935cd3 100644
--- a/lib/bundler/shared_helpers.rb
+++ b/lib/bundler/shared_helpers.rb
@@ -238,7 +238,11 @@ module Bundler
def find_gemfile
require_relative "../bundler"
- given = Bundler.settings[:gemfile]
+ given = if Bundler.feature_flag.config_relative_to_cwd?
+ Bundler.settings[:gemfile]
+ else
+ ENV["BUNDLE_GEMFILE"]
+ end
return given if given && !given.empty?
find_file(*gemfile_names)
end