aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bundler/runtime.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-01-19 13:05:04 -0800
committerAndre Arko <andre@arko.net>2015-01-19 13:10:43 -0800
commit4251a1bfe29a7980f80bcaf3dc28fa0f4d3992b0 (patch)
tree16812ebba9af684353fec0c1e7d81e9b05bc76df /lib/bundler/runtime.rb
parentd3922e972570f6bd1144dfeade35d81b5830ac6e (diff)
downloadbundler-4251a1bfe29a7980f80bcaf3dc28fa0f4d3992b0.tar.gz
share bundle env setup between exec and Runtime
this means we only have to maintain setting up Bundler environment variables in one place
Diffstat (limited to 'lib/bundler/runtime.rb')
-rw-r--r--lib/bundler/runtime.rb17
1 files changed, 1 insertions, 16 deletions
diff --git a/lib/bundler/runtime.rb b/lib/bundler/runtime.rb
index 52377d27..85299015 100644
--- a/lib/bundler/runtime.rb
+++ b/lib/bundler/runtime.rb
@@ -220,25 +220,10 @@ module Bundler
ENV["BUNDLE_BIN_PATH"] = File.expand_path("../../../bin/bundle", __FILE__)
end
- # Set PATH
- paths = (ENV["PATH"] || "").split(File::PATH_SEPARATOR)
- paths.unshift "#{Bundler.bundle_path}/bin"
- ENV["PATH"] = paths.uniq.join(File::PATH_SEPARATOR)
-
# Set BUNDLE_GEMFILE
ENV["BUNDLE_GEMFILE"] = default_gemfile.to_s
- # Set RUBYOPT
- rubyopt = [ENV["RUBYOPT"]].compact
- if rubyopt.empty? || rubyopt.first !~ /-rbundler\/setup/
- rubyopt.unshift %|-rbundler/setup|
- ENV["RUBYOPT"] = rubyopt.join(' ')
- end
-
- # Set RUBYLIB
- rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
- rubylib.unshift File.expand_path('../..', __FILE__)
- ENV["RUBYLIB"] = rubylib.uniq.join(File::PATH_SEPARATOR)
+ SharedHelpers.set_bundle_environment
end
private