Skip to content

Commit 3034575

Browse files
committed
Avoid reinstalling bundler if the required version is already installed
1 parent b1da480 commit 3034575

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎bundler.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,9 @@ export async function installBundler(bundlerVersionInput, rubygemsInputSet, lock
142142
const gem = path.join(rubyPrefix, 'bin', 'gem')
143143

144144
const versionParts = [...bundlerVersion.matchAll(/\d+/g)].length
145-
const bundlerVersionConstraint = versionParts >= 3 ? bundlerVersion : `~> ${bundlerVersion}.0`
145+
const options = versionParts >= 3 ? ['-v', bundlerVersion, '--conservative'] : ['-v', `~> ${bundlerVersion}.0`]
146146

147-
await exec.exec(gem, ['install', 'bundler', '-v', bundlerVersionConstraint])
147+
await exec.exec(gem, ['install', 'bundler', ...options])
148148

149149
return bundlerVersion
150150
}

‎dist/index.js‎

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

0 commit comments

Comments
 (0)