heroku jni error patch

This commit is contained in:
ChrisStone07 2020-04-08 02:43:04 +05:30
parent 45c6825fc5
commit a48da6a46f

View File

@ -11,11 +11,11 @@ function javaversion(callback) {
data = data.toString().split('\n')[0];
var javaVersion = new RegExp('java version').test(data) ? data.split(' ')[2].replace(/"/g, '') : false;
var openJDKVersion = new RegExp('openjdk version').test(data) ? data.split(' ')[2].replace(/"/g, '') : false;
if (javaVersion || openJDKVersion) {
// if (javaVersion || openJDKVersion) {
spawn.removeAllListeners();
spawn.stderr.removeAllListeners();
return callback(null, javaVersion);
} else return callback("Java Not Installed", undefined);
return callback(null, "javaVersion"); // Dirty fix to work with both heroku and vps ( in essence bypasses java check)
// } else return callback("Java Not Installed", undefined);
});
}