зеркало из https://github.com/github/ruby.git
[rubygems/rubygems] Normalize setting `GEM_PATH`
https://github.com/rubygems/rubygems/commit/4188ebd568
This commit is contained in:
Родитель
d0da3a2a7f
Коммит
71b937d3d7
|
@ -661,12 +661,12 @@ EOF
|
|||
configure_gem_home
|
||||
end
|
||||
|
||||
def configure_gem_path(env = ENV)
|
||||
def configure_gem_path
|
||||
unless use_system_gems?
|
||||
# this needs to be empty string to cause
|
||||
# PathSupport.split_gem_path to only load up the
|
||||
# Bundler --path setting as the GEM_PATH.
|
||||
env["GEM_PATH"] = ""
|
||||
Bundler::SharedHelpers.set_env "GEM_PATH", ""
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -176,11 +176,9 @@ RSpec.describe Bundler do
|
|||
describe "configuration" do
|
||||
context "disable_shared_gems" do
|
||||
it "should unset GEM_PATH with empty string" do
|
||||
env = {}
|
||||
expect(Bundler).to receive(:use_system_gems?).and_return(false)
|
||||
Bundler.send(:configure_gem_path, env)
|
||||
expect(env.keys).to include("GEM_PATH")
|
||||
expect(env["GEM_PATH"]).to eq ""
|
||||
Bundler.send(:configure_gem_path)
|
||||
expect(ENV["GEM_PATH"]).to eq ""
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче