Skip to content

Commit 6e00506

Browse files
authored
Fix puppet agent 8 compatibility
ubygems.rb has been removed in rubygems 3.2.0 with rubygems/rubygems#3102 Fixes puppetlabs#901
1 parent 34b1c8f commit 6e00506

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/helpers/commandHelper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export class CommandEnvironmentHelper {
196196
}
197197

198198
private static buildPuppetEnvironment(exe: Executable, config: IAggregateConfiguration) {
199-
exe.options.env.RUBYOPT = 'rubygems';
199+
exe.options.env.RUBYOPT = '-rrubygems';
200200
exe.options.env.SSL_CERT_FILE = config.ruby.sslCertFile;
201201
exe.options.env.SSL_CERT_DIR = config.ruby.sslCertDir;
202202
exe.options.env.RUBY_DIR = config.ruby.rubydir;
@@ -205,7 +205,7 @@ export class CommandEnvironmentHelper {
205205
}
206206

207207
private static buildPDKEnvironment(exe: Executable, config: IAggregateConfiguration) {
208-
exe.options.env.RUBYOPT = 'rubygems';
208+
exe.options.env.RUBYOPT = '-rrubygems';
209209
exe.options.env.DEVKIT_BASEDIR = config.ruby.puppetBaseDir;
210210
exe.options.env.RUBY_DIR = config.ruby.pdkRubyDir;
211211
exe.options.env.GEM_HOME = config.ruby.pdkGemDir;

0 commit comments

Comments
 (0)