Remove direct bundler usage within Env util

This commit is contained in:
Chris Roberts 2016-12-07 06:00:56 -08:00
parent b2457e3e21
commit c20e160295
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,3 @@
require "bundler"
module Vagrant module Vagrant
module Util module Util
class Env class Env
@ -39,7 +37,9 @@ module Vagrant
# the block to execute with the cleaned environment # the block to execute with the cleaned environment
def self.with_clean_env def self.with_clean_env
with_original_env do with_original_env do
ENV["MANPATH"] = ENV["BUNDLE_ORIG_MANPATH"] if ENV["BUNDLE_ORIG_MANPATH"]
ENV["MANPATH"] = ENV["BUNDLE_ORIG_MANPATH"]
end
ENV.delete_if { |k,_| k[0,7] == "BUNDLE_" } ENV.delete_if { |k,_| k[0,7] == "BUNDLE_" }
if ENV.has_key? "RUBYOPT" if ENV.has_key? "RUBYOPT"
ENV["RUBYOPT"] = ENV["RUBYOPT"].sub("-rbundler/setup", "") ENV["RUBYOPT"] = ENV["RUBYOPT"].sub("-rbundler/setup", "")