[jrubyscripting] avoid polluting environment when auto-installing gems (#13328)
fixes https://github.com/boc-tothefuture/openhab-jruby/issues/634; regression from https://github.com/openhab/openhab-addons/pull/13151 Signed-Off-By: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
parent
a327167a58
commit
449d3518f6
@ -164,8 +164,10 @@ public class JRubyScriptEngineConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String[] gems = gemsConfigElement.getValue().get().split(",");
|
String[] gems = gemsConfigElement.getValue().get().split(",");
|
||||||
String gemCommand = "require 'bundler/inline'\nrequire 'openssl'\n\ngemfile(" + checkUpdate + ") do\n"
|
// Set update_native_env_enabled to false so that bundler doesn't leak
|
||||||
+ " source 'https://rubygems.org/'\n";
|
// into other script engines
|
||||||
|
String gemCommand = "require 'jruby'\nJRuby.runtime.instance_config.update_native_env_enabled = false\nrequire 'bundler/inline'\nrequire 'openssl'\n\ngemfile("
|
||||||
|
+ checkUpdate + ") do\n" + " source 'https://rubygems.org/'\n";
|
||||||
int validGems = 0;
|
int validGems = 0;
|
||||||
for (String gem : gems) {
|
for (String gem : gems) {
|
||||||
gem = gem.trim();
|
gem = gem.trim();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user