Skip to content

Commit 4726835

Browse files
committed
Try 'gem install --force bundler' on 3.1 Windows
1 parent bee16c9 commit 4726835

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

bundler.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ export async function installBundler(bundlerVersionInput, lockFile, platform, ru
9191
} else {
9292
const gem = path.join(rubyPrefix, 'bin', 'gem')
9393
const bundlerVersionConstraint = /^\d+\.\d+\.\d+/.test(bundlerVersion) ? bundlerVersion : `~> ${bundlerVersion}`
94-
await exec.exec(gem, ['install', 'bundler', '-v', bundlerVersionConstraint])
94+
// Workaround for https://github.com/rubygems/rubygems/issues/5245
95+
const force = (platform.startsWith('windows-') && engine === 'ruby' && common.floatVersion(rubyVersion) >= 3.1) ? ['--force'] : []
96+
await exec.exec(gem, ['install', 'bundler', ...force, '-v', bundlerVersionConstraint])
9597
}
9698

9799
return bundlerVersion

dist/index.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)