mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Ignore to add bundler lib direcotry if it is same as rubylibdir.
[Bug #15469][ruby-core:90742] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
883d2d0133
commit
0fadb48498
2 changed files with 10 additions and 1 deletions
|
@ -340,7 +340,7 @@ module Bundler
|
|||
|
||||
def set_rubylib
|
||||
rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
|
||||
rubylib.unshift bundler_ruby_lib
|
||||
rubylib.unshift bundler_ruby_lib unless RbConfig::CONFIG["rubylibdir"] == bundler_ruby_lib
|
||||
Bundler::SharedHelpers.set_env "RUBYLIB", rubylib.uniq.join(File::PATH_SEPARATOR)
|
||||
end
|
||||
|
||||
|
|
|
@ -261,6 +261,15 @@ RSpec.describe Bundler::SharedHelpers do
|
|||
subject.set_bundle_environment
|
||||
end
|
||||
|
||||
it "ignores if bundler_ruby_lib is same as rubylibdir" do
|
||||
allow(Bundler::SharedHelpers).to receive(:bundler_ruby_lib).and_return(RbConfig::CONFIG["rubylibdir"])
|
||||
|
||||
subject.set_bundle_environment
|
||||
|
||||
paths = (ENV["RUBYLIB"]).split(File::PATH_SEPARATOR)
|
||||
expect(paths.count(RbConfig::CONFIG["rubylibdir"])).to eq(0)
|
||||
end
|
||||
|
||||
it "exits if bundle path contains the unix-like path separator" do
|
||||
if Gem.respond_to?(:path_separator)
|
||||
allow(Gem).to receive(:path_separator).and_return(":")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue