mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 22:44:20 +02:00
Don't use --force flag on Windows
It was originally added by https://github.com/ruby/setup-ruby/pull/253, in order to fix CI. However, now CI passes without it so I assume this was fixed by rubyinstaller2. Force actually bypasses dependency constraints so it's actually installing the latest Bundler in a version of Ruby that's incompatible with it.
This commit is contained in:
committed by
Benoit Daloze
parent
a0d08243d4
commit
f66e1124dc
+1
-2
@@ -137,9 +137,8 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
|
||||
}
|
||||
|
||||
const gem = path.join(rubyPrefix, 'bin', 'gem')
|
||||
// Workaround for https://github.com/rubygems/rubygems/issues/5245
|
||||
// and for https://github.com/oracle/truffleruby/issues/2780
|
||||
const force = ((platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) || (engine === 'truffleruby')) ? ['--force'] : []
|
||||
const force = engine === 'truffleruby' ? ['--force'] : []
|
||||
|
||||
const versionParts = [...bundlerVersion.matchAll(/\d+/g)].length
|
||||
const bundlerVersionConstraint = versionParts >= 3 ? bundlerVersion : `~> ${bundlerVersion}.0`
|
||||
|
||||
+1
-2
@@ -151,9 +151,8 @@ async function installBundler(bundlerVersionInput, rubygemsInputSet, lockFile, p
|
||||
}
|
||||
|
||||
const gem = path.join(rubyPrefix, 'bin', 'gem')
|
||||
// Workaround for https://github.com/rubygems/rubygems/issues/5245
|
||||
// and for https://github.com/oracle/truffleruby/issues/2780
|
||||
const force = ((platform.startsWith('windows-') && engine === 'ruby' && floatVersion >= 3.1) || (engine === 'truffleruby')) ? ['--force'] : []
|
||||
const force = engine === 'truffleruby' ? ['--force'] : []
|
||||
|
||||
const versionParts = [...bundlerVersion.matchAll(/\d+/g)].length
|
||||
const bundlerVersionConstraint = versionParts >= 3 ? bundlerVersion : `~> ${bundlerVersion}.0`
|
||||
|
||||
Reference in New Issue
Block a user