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