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]; data = data.toString().split('\n')[0];
var javaVersion = new RegExp('java version').test(data) ? data.split(' ')[2].replace(/"/g, '') : false; 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; var openJDKVersion = new RegExp('openjdk version').test(data) ? data.split(' ')[2].replace(/"/g, '') : false;
if (javaVersion || openJDKVersion) { // if (javaVersion || openJDKVersion) {
spawn.removeAllListeners(); spawn.removeAllListeners();
spawn.stderr.removeAllListeners(); spawn.stderr.removeAllListeners();
return callback(null, javaVersion); 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); // } else return callback("Java Not Installed", undefined);
}); });
} }