Skip to content

Commit ee5764d

Browse files
committed
Give more details on why the shipped Bundler is used in some cases
1 parent 2b01960 commit ee5764d

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

bundler.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,19 @@ export async function installBundler(bundlerVersionInput, lockFile, platform, ru
8585
}
8686

8787
// Workaround for truffleruby 22.0 + latest Bundler, use shipped Bundler instead: https://github.com/oracle/truffleruby/issues/2586
88-
const useShippedBundler2 = common.isHeadVersion(rubyVersion) || (engine.startsWith('truffleruby') && rubyVersion.startsWith('22.0'))
88+
const truffleruby22workaround = engine.startsWith('truffleruby') && rubyVersion.startsWith('22.0')
89+
const useShippedBundler2 = common.isHeadVersion(rubyVersion) || truffleruby22workaround
8990

9091
if (useShippedBundler2 && common.isBundler2Default(engine, rubyVersion) && bundlerVersion.startsWith('2')) {
9192
// Avoid installing a newer Bundler version for head versions as it might not work.
9293
// For releases, even if they ship with Bundler 2 we install the latest Bundler.
93-
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion}`)
94+
if (truffleruby22workaround) {
95+
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion} (workaround for https://github.com/oracle/truffleruby/issues/2586 on truffleruby 22.0)`)
96+
} else {
97+
console.log(`Using Bundler 2 shipped with ${engine}-${rubyVersion} (head versions do not always support the latest Bundler release)`)
98+
}
9499
} else if (engine.startsWith('truffleruby') && common.isBundler1Default(engine, rubyVersion) && bundlerVersion.startsWith('1')) {
95-
console.log(`Using Bundler 1 shipped with ${engine}-${rubyVersion}`)
100+
console.log(`Using Bundler 1 shipped with ${engine}-${rubyVersion} (required for truffleruby < 21.0)`)
96101
} else {
97102
const gem = path.join(rubyPrefix, 'bin', 'gem')
98103
// Workaround for https://github.com/rubygems/rubygems/issues/5245

dist/index.js

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

0 commit comments

Comments
 (0)