Skip to content

Commit

Permalink
Exit with error if Java home can't be found
Browse files Browse the repository at this point in the history
  • Loading branch information
andyf0x committed Oct 17, 2021
1 parent 8f0952d commit 88168d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions findJavaHome.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require('find-java-home')(function(err, home){
if(err){
console.error("[node-java] "+err);
if (err || !home) {
if (!err) err = Error('Unable to determine Java home location');
process.exit(1);
}
process.stdout.write(home);
Expand Down

0 comments on commit 88168d1

Please sign in to comment.