Skip to content

Commit dafecf7

Browse files
committed
Installing libxml2-dev libxslt-dev is only needed on TruffleRuby < 21.1
* TruffleRuby >= 21.1 installs nokogiri with the packaged libxml2/libxslt like on CRuby by default. See oracle/truffleruby#62
1 parent 1c08ecf commit dafecf7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

bundler.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ function readBundledWithFromGemfileLock(lockFile) {
4040
return null
4141
}
4242

43-
async function afterLockFile(lockFile, platform, engine) {
44-
if (engine.startsWith('truffleruby') && platform.startsWith('ubuntu-')) {
43+
async function afterLockFile(lockFile, platform, engine, rubyVersion) {
44+
if (engine.startsWith('truffleruby') && common.floatVersion(rubyVersion) < 21.1 && platform.startsWith('ubuntu-')) {
4545
const contents = fs.readFileSync(lockFile, 'utf8')
4646
if (contents.includes('nokogiri')) {
4747
await common.measure('Installing libxml2-dev libxslt-dev, required to install nokogiri on TruffleRuby', async () =>
@@ -126,7 +126,7 @@ export async function bundleInstall(gemfile, lockFile, platform, engine, rubyVer
126126
await exec.exec('bundle', ['lock'], envOptions)
127127
}
128128

129-
await afterLockFile(lockFile, platform, engine)
129+
await afterLockFile(lockFile, platform, engine, rubyVersion)
130130

131131
// cache key
132132
const paths = [cachePath]

dist/index.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)