diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-04 17:05:12 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-19 21:09:13 +0900 |
commit | e742c3d5f458a4a59cf0eaab2567eca844f956d1 (patch) | |
tree | ca16d3bba1e566f7d9860b98868f20b154feb5d0 | |
parent | cf9a2883fea3c28c8d869c72b1b407162a28e0b3 (diff) | |
download | bundler-e742c3d5f458a4a59cf0eaab2567eca844f956d1.tar.gz |
Load executable relatively in the first place
-rw-r--r-- | lib/bundler/shared_helpers.rb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index c7b1024309..14d09b72d5 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -289,18 +289,10 @@ module Bundler 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 |