Skip to content

Commit 5c0bbf7

Browse files
committed
Move JAVA_HOME setup into install
1 parent f3baf96 commit 5c0bbf7

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

dist/index.js

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

index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ export async function setupRuby(options = {}) {
7979

8080
const rubyPrefix = await installer.install(platform, engine, version)
8181

82-
if (engine === "jruby") {
83-
await common.setupJavaHome()
84-
}
85-
8682
await common.measure('Print Ruby version', async () =>
8783
await exec.exec('ruby', ['--version']))
8884

ruby-builder.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ export async function install(platform, engine, version) {
5454
await downloadAndExtract(platform, engine, version, rubyPrefix)
5555
}
5656

57+
// Ensure JRuby has minimum Java version to run
58+
if (engine === "jruby") {
59+
await common.setupJavaHome()
60+
}
61+
5762
return rubyPrefix
5863
}
5964

0 commit comments

Comments
 (0)