diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-11-05 12:59:25 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-11-06 21:45:31 +0100 |
commit | 036efa71c7092a04acf17ac3e2856df95838e589 (patch) | |
tree | 27365364800272e06dad7de004f16c53643903b4 | |
parent | b12a21f8cd2ab0ed66a6d0083df14b1444444198 (diff) | |
download | bundler-no_env_in_front.tar.gz |
Pass `env` as a parameter to `sys_exec`no_env_in_front
-rw-r--r-- | spec/support/helpers.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index 1099602fc1..8bf76bba89 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -172,10 +172,10 @@ module Spec end def ruby(ruby, options = {}) - env = (options.delete(:env) || {}).map {|k, v| "#{k}='#{v}' " }.join + env = options.delete(:env) || {} ruby = ruby.gsub(/["`\$]/) {|m| "\\#{m}" } lib_option = options[:no_lib] ? "" : " -I#{lib_dir}" - sys_exec(%(#{env}#{Gem.ruby}#{lib_option} -e "#{ruby}")) + sys_exec(%(#{Gem.ruby}#{lib_option} -e "#{ruby}"), env) end bang :ruby |