Skip to content

Commit 82eb255

Browse files
committed
Handle exec error
Apparently this exec errors when the subprocess fails rather than returning an error code. This causes the whole setup process to terminate. This patch catches the error and uses that to indicate failure to launch.
1 parent f0a4d6b commit 82eb255

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export async function setupJavaHome() {
409409
await measure("Modifying JAVA_HOME for JRuby", async () => {
410410
console.log("attempting to run with existing JAVA_HOME")
411411

412-
let ret = await exec.exec('ruby', ['--version'])
412+
let ret = await exec.exec('ruby', ['--version'], {ignoreReturnCode: true})
413413

414414
if (ret === 0) {
415415
console.log("JRuby successfully starts, using existing JAVA_HOME")

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)