Skip to content
This repository has been archived by the owner on Jul 18, 2023. It is now read-only.

Commit

Permalink
a. (v1.2.6)
Browse files Browse the repository at this point in the history
  • Loading branch information
reisxd committed Jul 9, 2022
1 parent 14498f6 commit 632cebe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ async function getADBDeviceID () {
async function checkForJavaADB () {
try {
const javaCheck = await actualExec('java -version');
const javaVer = Array.from(javaCheck.stderr.matchAll(/version\s([^:]+)/g))
const javaVerLog = javaCheck.stderr || javaCheck.stdout;
const javaVer = Array.from(javaVerLog.matchAll(/version\s([^:]+)/g))
.map((match) => match[1])[0]
.match(/"(.*)"/)[1];
if (javaVer.split('.')[0] < 17) {
Expand All @@ -263,7 +264,7 @@ async function checkForJavaADB () {
return await exitProcess();
}

if (!javaCheck.stderr.includes('Zulu')) {
if (!javaVerLog.includes('Zulu')) {
console.log(
'You have Java, but not Zulu JDK. You need to install it because of signing problems.\nPlease get it from here: https://www.azul.com/downloads/?version=java-17-lts&package=jdk'
);
Expand Down

0 comments on commit 632cebe

Please sign in to comment.