mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
bundlerEnv: fix wrapping of programs
Setting the GEM_PATH after ruby is started is not reliable enough. In some cases rubygems would have already loaded and ignore these settings. Fixes #14048
This commit is contained in:
parent
25122f05b0
commit
53c9edef34
@ -32,10 +32,8 @@ paths.each do |path|
|
||||
ENV["BUNDLE_GEMFILE"] = "#{gemfile}"
|
||||
ENV["BUNDLE_PATH"] = "#{bundle_path}"
|
||||
|
||||
gem_path = ENV["GEM_PATH"]
|
||||
ENV["GEM_PATH"] = "\#{gem_path}\#{":" unless gem_path.nil? || gem_path.empty?}#{bundler_gem_path}"
|
||||
Gem.use_paths("#{bundler_gem_path}", ENV["GEM_PATH"])
|
||||
|
||||
require 'rubygems'
|
||||
require 'bundler/setup'
|
||||
|
||||
load Gem.bin_path(#{name.inspect}, #{exe.inspect})
|
||||
|
Loading…
Reference in New Issue
Block a user