Skip to content
This repository has been archived by the owner on Apr 14, 2021. It is now read-only.

Commit

Permalink
Load executable relatively in the first place
Browse files Browse the repository at this point in the history
  • Loading branch information
deivid-rodriguez committed Apr 4, 2019
1 parent 649d6e8 commit e9a39a9
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions lib/bundler/shared_helpers.rb
Expand Up @@ -306,18 +306,10 @@ def set_env(key, value)
public :set_env

def set_bundle_variables
begin
exe_file = Bundler.rubygems.bin_path("bundler", "bundle", VERSION)
unless File.exist?(exe_file)
exe_file = File.expand_path("../../../exe/bundle", __FILE__)
end
Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", exe_file
rescue Gem::GemNotFoundException
exe_file = File.expand_path("../../../exe/bundle", __FILE__)
# for Ruby core repository
exe_file = File.expand_path("../../../../bin/bundle", __FILE__) unless File.exist?(exe_file)
Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", exe_file
end
exe_file = File.expand_path("../../../exe/bundle", __FILE__)
# for Ruby core repository
exe_file = File.expand_path("../../../../bin/bundle", __FILE__) unless File.exist?(exe_file)
Bundler::SharedHelpers.set_env "BUNDLE_BIN_PATH", exe_file

# Set BUNDLE_GEMFILE
Bundler::SharedHelpers.set_env "BUNDLE_GEMFILE", find_gemfile(:order_matters).to_s
Expand Down

0 comments on commit e9a39a9

Please sign in to comment.