From 6e0050647dec02ab9ecc477393b78890dec47be6 Mon Sep 17 00:00:00 2001 From: Filippo Giunchedi Date: Tue, 29 Apr 2025 17:00:06 +0200 Subject: [PATCH] Fix puppet agent 8 compatibility ubygems.rb has been removed in rubygems 3.2.0 with https://github.com/rubygems/rubygems/pull/3102 Fixes #901 --- src/helpers/commandHelper.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/commandHelper.ts b/src/helpers/commandHelper.ts index 9d235d83..a51ffd66 100644 --- a/src/helpers/commandHelper.ts +++ b/src/helpers/commandHelper.ts @@ -196,7 +196,7 @@ export class CommandEnvironmentHelper { } private static buildPuppetEnvironment(exe: Executable, config: IAggregateConfiguration) { - exe.options.env.RUBYOPT = 'rubygems'; + exe.options.env.RUBYOPT = '-rrubygems'; exe.options.env.SSL_CERT_FILE = config.ruby.sslCertFile; exe.options.env.SSL_CERT_DIR = config.ruby.sslCertDir; exe.options.env.RUBY_DIR = config.ruby.rubydir; @@ -205,7 +205,7 @@ export class CommandEnvironmentHelper { } private static buildPDKEnvironment(exe: Executable, config: IAggregateConfiguration) { - exe.options.env.RUBYOPT = 'rubygems'; + exe.options.env.RUBYOPT = '-rrubygems'; exe.options.env.DEVKIT_BASEDIR = config.ruby.puppetBaseDir; exe.options.env.RUBY_DIR = config.ruby.pdkRubyDir; exe.options.env.GEM_HOME = config.ruby.pdkGemDir;