Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit af544e6

Browse files
committed
Merge pull request #463 from anshulguleria/javac-version-extraction
Fixes the javac version extraction issue
2 parents 01c4b6b + caa48c1 commit af544e6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

sysinfo.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ export class SysInfo implements ISysInfo {
7777
res.gradleVer = procOutput ? /Gradle (.*)/i.exec(procOutput)[1] : null;
7878

7979
let output = this.exec("javac -version", { showStderr: true });
80-
res.javacVersion = output ? /^javac (.*)/i.exec(output.stderr)[1]: null;
80+
// for other versions of java javac version output is not on first line
81+
// thus can't use ^ for starts with in regex
82+
res.javacVersion = output ? /javac (.*)/i.exec(output.stderr)[1]: null;
8183

8284
this.sysInfoCache = res;
8385
}

0 commit comments

Comments
 (0)