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

fix java version detect #1017

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sys-info-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class SysInfoBase implements ISysInfo {
if (!this.javaVerCache) {
try {
// different java has different format for `java -version` command
const output = (await this.$childProcess.spawnFromEvent("java", ["-version"], "exit")).stderr;
const output = (await this.$childProcess.spawnFromEvent("java", ["-version"], "exit")).stdout;
this.javaVerCache = /(?:openjdk|java) version \"((?:\d+\.)+(?:\d+))/i.exec(output)[1];
} catch (e) {
this.javaVerCache = null;
Expand Down