Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return correct exit code in case of error #73

Open
andrii-bodnar opened this issue Jun 2, 2022 · 0 comments
Open

Return correct exit code in case of error #73

andrii-bodnar opened this issue Jun 2, 2022 · 0 comments

Comments

@andrii-bodnar
Copy link

andrii-bodnar commented Jun 2, 2022

Problem

We have the Java CLI application which is distributed as a NodeJS app using the jDeploy.

When the Node.js CLI fails to download the JRE, the CLI does not exit with an error code.

Actual result

$ crowdin upload sources

Downloading java runtime environment for version 11

Failed to install JRE FetchError: invalid json response body at
https://api.adoptopenjdk.net/v2/info/releases/openjdk11?o0penjdk_impl=hotspot&release=Latest&type=jre&os=Linux&arch=x64&
reason: Unexpected token < in JSON at position 0

at /opt/build/repo/node_modules/node-fetch/lib/index.js:273:32

at processTicksAndRejections (node: internal/process/task_queues:96:5) {

type: 'invalid-json'

}

CLI exit code after this error is 0.

Expected result

Exit code - 1.

Additional info

We can't control this exit code from our CLI because the error happens at a higher level.

jDeploy version - 2.0.11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant