Skip to content

Commit

Permalink
src/goInstallTools.ts: fix parsing version for tools built with GOPAT…
Browse files Browse the repository at this point in the history
…H mode
  • Loading branch information
Viknet committed Dec 23, 2024
1 parent 58145f9 commit 90da3cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extension/src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ async function defaultInspectGoToolVersion(
*/
const lines = stdout.split('\n', 3);
const goVersion = lines[0] && lines[0].match(/\s+(go\d+.\d+\S*)/)?.[1];
const moduleVersion = lines[2].split(/\s+/)[3];
const moduleVersion = lines.length > 2 ? lines[2].split(/\s+/)[3] : "unknown";
return { goVersion, moduleVersion };
} catch (e) {
// either go version failed (e.g. the tool was compiled with a more recent version of go)
Expand Down

0 comments on commit 90da3cf

Please sign in to comment.