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.
This commit is contained in:
Charles Oliver Nutter
2025-03-13 20:32:49 +01:00
committed by Benoit Daloze
parent f0a4d6bddd
commit e17c5ea7eb
2 changed files with 2 additions and 2 deletions
Generated Vendored
+1 -1
View File
@@ -729,7 +729,7 @@ async function setupJavaHome() {
await measure("Modifying JAVA_HOME for JRuby", async () => {
console.log("attempting to run with existing JAVA_HOME")
let ret = await exec.exec('ruby', ['--version'])
let ret = await exec.exec('ruby', ['--version'], {ignoreReturnCode: true})
if (ret === 0) {
console.log("JRuby successfully starts, using existing JAVA_HOME")