code cleanup osinfo
This commit is contained in:
parent
b694316c82
commit
604dd02b13
@ -589,8 +589,7 @@ function versions(callback) {
|
||||
if (_darwin) {
|
||||
// check if any JVM is installed but avoid dialog box that Java needs to be installed
|
||||
exec('/usr/libexec/java_home -V 2>&1', function (error, stdout) {
|
||||
const output = stdout.toString().toLowerCase();
|
||||
if (output.indexOf('no java runtime') === -1) {
|
||||
if (!error && stdout.toString().toLowerCase().indexOf('no java runtime') === -1) {
|
||||
// now this can be done savely
|
||||
exec('java -version 2>&1', function (error, stdout) {
|
||||
if (!error) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user