mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-14 15:04:20 +02:00
Do not install Bundler 2 for ruby-head since it already ships a version that might work better
This commit is contained in:
+7
-1
@@ -1115,7 +1115,9 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
|
||||
|
||||
if (engine === 'rubinius') {
|
||||
console.log(`Rubinius only supports the version of Bundler shipped with it`)
|
||||
} else if (bundlerVersion === '1' && engine === 'truffleruby') {
|
||||
} else if (engine === 'ruby' && isHeadVersion(rubyVersion) && bundlerVersion === '2') {
|
||||
console.log(`Using the Bundler version shipped with ${engine}-${rubyVersion}`)
|
||||
} else if (engine === 'truffleruby' && bundlerVersion === '1') {
|
||||
console.log(`Using the Bundler version shipped with ${engine}`)
|
||||
} else {
|
||||
const gem = path.join(rubyPrefix, 'bin', 'gem')
|
||||
@@ -1123,6 +1125,10 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
|
||||
}
|
||||
}
|
||||
|
||||
function isHeadVersion(rubyVersion) {
|
||||
return rubyVersion === 'head' || rubyVersion === 'mingw' || rubyVersion === 'mswin'
|
||||
}
|
||||
|
||||
function getVirtualEnvironmentName() {
|
||||
const platform = os.platform()
|
||||
if (platform === 'linux') {
|
||||
|
||||
@@ -157,7 +157,9 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
|
||||
|
||||
if (engine === 'rubinius') {
|
||||
console.log(`Rubinius only supports the version of Bundler shipped with it`)
|
||||
} else if (bundlerVersion === '1' && engine === 'truffleruby') {
|
||||
} else if (engine === 'ruby' && isHeadVersion(rubyVersion) && bundlerVersion === '2') {
|
||||
console.log(`Using the Bundler version shipped with ${engine}-${rubyVersion}`)
|
||||
} else if (engine === 'truffleruby' && bundlerVersion === '1') {
|
||||
console.log(`Using the Bundler version shipped with ${engine}`)
|
||||
} else {
|
||||
const gem = path.join(rubyPrefix, 'bin', 'gem')
|
||||
@@ -165,6 +167,10 @@ async function installBundler(platform, rubyPrefix, engine, rubyVersion) {
|
||||
}
|
||||
}
|
||||
|
||||
function isHeadVersion(rubyVersion) {
|
||||
return rubyVersion === 'head' || rubyVersion === 'mingw' || rubyVersion === 'mswin'
|
||||
}
|
||||
|
||||
function getVirtualEnvironmentName() {
|
||||
const platform = os.platform()
|
||||
if (platform === 'linux') {
|
||||
|
||||
Reference in New Issue
Block a user