From f2c070bbf74632495b403899c87610cd4cb99dbe Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 9 Nov 2022 16:49:24 +0100 Subject: [PATCH] Workaround https://github.com/oracle/truffleruby/issues/2780 --- bundler.js | 3 ++- dist/index.js | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bundler.js b/bundler.js index 3e86c07c0..090e16ca4 100644 --- a/bundler.js +++ b/bundler.js @@ -117,7 +117,8 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock const gem = path.join(rubyPrefix, 'bin', 'gem') // Workaround for https://github.com/rubygems/rubygems/issues/5245 - const force = (platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) ? ['--force'] : [] + // and for https://github.com/oracle/truffleruby/issues/2780 + const force = ((platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) || (engine === 'truffleruby')) ? ['--force'] : [] const versionParts = [...bundlerVersion.matchAll(/\d+/g)].length const bundlerVersionConstraint = versionParts === 3 ? bundlerVersion : `~> ${bundlerVersion}.0` diff --git a/dist/index.js b/dist/index.js index fea55cce4..47da3e0d2 100644 --- a/dist/index.js +++ b/dist/index.js @@ -131,7 +131,8 @@ async function installBundler(bundlerVersionInput, rubygemsInputSet, lockFile, p const gem = path.join(rubyPrefix, 'bin', 'gem') // Workaround for https://github.com/rubygems/rubygems/issues/5245 - const force = (platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) ? ['--force'] : [] + // and for https://github.com/oracle/truffleruby/issues/2780 + const force = ((platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) || (engine === 'truffleruby')) ? ['--force'] : [] const versionParts = [...bundlerVersion.matchAll(/\d+/g)].length const bundlerVersionConstraint = versionParts === 3 ? bundlerVersion : `~> ${bundlerVersion}.0`