diff options
-rw-r--r-- | lib/bundler/self_manager.rb | 31 | ||||
-rw-r--r-- | lib/resolv.rb | 2 | ||||
-rw-r--r-- | lib/rubygems.rb | 1 |
3 files changed, 14 insertions, 20 deletions
@@ -68,30 +68,23 @@ module Bundler def restart_with(version) configured_gem_home = ENV["GEM_HOME"] configured_gem_path = ENV["GEM_PATH"] - # Bundler specs need some stuff to be required before Bundler starts - # running, for example, for faking the compact index API. However, these - # flags are lost when we reexec to a different version of Bundler. In the - # future, we may be able to properly reconstruct the original Ruby - # invocation (see https://bugs.ruby-lang.org/issues/6648), but for now - # there's no way to do it, so we need to be explicit about how to re-exec. - # This may be a feature end users request at some point, but maybe by that - # time, we have builtin tools to do. So for now, we use an undocumented - # ENV variable only for our specs. - bundler_spec_original_cmd = ENV["BUNDLER_SPEC_ORIGINAL_CMD"] - if bundler_spec_original_cmd - require "shellwords" - cmd = [*Shellwords.shellsplit(bundler_spec_original_cmd), *ARGV] - else - argv0 = File.exist?($PROGRAM_NAME) ? $PROGRAM_NAME : Process.argv0 - cmd = [argv0, *ARGV] - cmd.unshift(Gem.ruby) unless File.executable?(argv0) - end Bundler.with_original_env do Kernel.exec( - { "GEM_HOME" => configured_gem_home, "GEM_PATH" => configured_gem_path, "BUNDLER_VERSION" => version.to_s }, *cmd ) end @@ -33,7 +33,7 @@ require 'securerandom' class Resolv - VERSION = "0.6.0" ## # Looks up the first IP address for +name+. @@ -1,4 +1,5 @@ # frozen_string_literal: true #-- # Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others. # All rights reserved. |