mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
Try 'gem install --force bundler' on 3.1 Windows
This commit is contained in:
+3
-1
@@ -91,7 +91,9 @@ export async function installBundler(bundlerVersionInput, lockFile, platform, ru
|
||||
} else {
|
||||
const gem = path.join(rubyPrefix, 'bin', 'gem')
|
||||
const bundlerVersionConstraint = /^\d+\.\d+\.\d+/.test(bundlerVersion) ? bundlerVersion : `~> ${bundlerVersion}`
|
||||
await exec.exec(gem, ['install', 'bundler', '-v', bundlerVersionConstraint])
|
||||
// Workaround for https://github.com/rubygems/rubygems/issues/5245
|
||||
const force = (platform.startsWith('windows-') && engine === 'ruby' && common.floatVersion(rubyVersion) >= 3.1) ? ['--force'] : []
|
||||
await exec.exec(gem, ['install', 'bundler', ...force, '-v', bundlerVersionConstraint])
|
||||
}
|
||||
|
||||
return bundlerVersion
|
||||
|
||||
+3
-1
@@ -105,7 +105,9 @@ async function installBundler(bundlerVersionInput, lockFile, platform, rubyPrefi
|
||||
} else {
|
||||
const gem = path.join(rubyPrefix, 'bin', 'gem')
|
||||
const bundlerVersionConstraint = /^\d+\.\d+\.\d+/.test(bundlerVersion) ? bundlerVersion : `~> ${bundlerVersion}`
|
||||
await exec.exec(gem, ['install', 'bundler', '-v', bundlerVersionConstraint])
|
||||
// Workaround for https://github.com/rubygems/rubygems/issues/5245
|
||||
const force = (platform.startsWith('windows-') && engine === 'ruby' && common.floatVersion(rubyVersion) >= 3.1) ? ['--force'] : []
|
||||
await exec.exec(gem, ['install', 'bundler', ...force, '-v', bundlerVersionConstraint])
|
||||
}
|
||||
|
||||
return bundlerVersion
|
||||
|
||||
Reference in New Issue
Block a user