mirror of
https://github.com/ruby/setup-ruby.git
synced 2026-09-13 14:34:21 +02:00
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:
committed by
Benoit Daloze
parent
f0a4d6bddd
commit
e17c5ea7eb
+1
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user