Compare commits

...
1 Commits
3 changed files with 21 additions and 8 deletions
+13
View File
@@ -352,6 +352,19 @@ jobs:
bundler: 2.2.3 bundler: 2.2.3
- run: bundle --version | grep -F "Bundler version 2.2.3" - run: bundle --version | grep -F "Bundler version 2.2.3"
# https://github.com/ruby/setup-ruby/issues/845
testOlderBundlerVersion:
name: "Test with an older Bundler version than the one of the default gem"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./
with:
ruby-version: '4.0'
bundler: 2.7.2
bundler-cache: true
- run: bundle --version | grep -F "Bundler version 2.7.2"
testBundlerPre: testBundlerPre:
name: "Test with a Bundler pre/rc version" name: "Test with a Bundler pre/rc version"
runs-on: ubuntu-latest runs-on: ubuntu-latest
+4 -4
View File
@@ -162,10 +162,10 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer
} }
let envOptions = {} let envOptions = {}
if (bundlerVersion.startsWith('1') && common.isBundler2PlusDefault(engine, rubyVersion)) { if (bundlerVersion.match(/^\d+/)) {
// If Bundler 1 is specified on Rubies which ship with Bundler 2+, // If a specific Bundler version is given or determined, we need to specify the version to use explicitly until the lockfile exists.
// we need to specify which Bundler version to use explicitly until the lockfile exists. // Otherwise, a newer version of Bundler might be used.
console.log(`Setting BUNDLER_VERSION=${bundlerVersion} for "bundle config|lock" commands below to ensure Bundler 1 is used`) console.log(`Setting BUNDLER_VERSION=${bundlerVersion} for "bundle config|lock" commands below to ensure Bundler ${bundlerVersion} is used`)
envOptions = { env: { ...process.env, BUNDLER_VERSION: bundlerVersion } } envOptions = { env: { ...process.env, BUNDLER_VERSION: bundlerVersion } }
} }
Generated Vendored
+4 -4
View File
@@ -176,10 +176,10 @@ async function bundleInstall(gemfile, lockFile, platform, engine, rubyVersion, b
} }
let envOptions = {} let envOptions = {}
if (bundlerVersion.startsWith('1') && common.isBundler2PlusDefault(engine, rubyVersion)) { if (bundlerVersion.match(/^\d+/)) {
// If Bundler 1 is specified on Rubies which ship with Bundler 2+, // If a specific Bundler version is given or determined, we need to specify the version to use explicitly until the lockfile exists.
// we need to specify which Bundler version to use explicitly until the lockfile exists. // Otherwise, a newer version of Bundler might be used.
console.log(`Setting BUNDLER_VERSION=${bundlerVersion} for "bundle config|lock" commands below to ensure Bundler 1 is used`) console.log(`Setting BUNDLER_VERSION=${bundlerVersion} for "bundle config|lock" commands below to ensure Bundler ${bundlerVersion} is used`)
envOptions = { env: { ...process.env, BUNDLER_VERSION: bundlerVersion } } envOptions = { env: { ...process.env, BUNDLER_VERSION: bundlerVersion } }
} }