Skip to content

Commit 06424c7

Browse files
committed
[release] src/goInstallTools.ts: avoid type check error
Some versions of go do not seem to print an empty line for unrecognized env variables. Change-Id: I7a48dabbe6c0e230fe9a6b3c64944552f8890262 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/245642 Reviewed-by: Brayden Cloud <[email protected]> Reviewed-by: Hyang-Ah Hana Kim <[email protected]> (cherry picked from commit 9523e4b) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/245644 Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
1 parent 806b088 commit 06424c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/goInstallTools.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ export function updateGoVarsFromConfig(): Promise<void> {
366366
if (!process.env['GOBIN'] && envOutput[3] && envOutput[3].trim()) {
367367
process.env['GOBIN'] = envOutput[3].trim();
368368
}
369-
if (!process.env['GOMODCACHE']) {
369+
if (!process.env['GOMODCACHE'] && envOutput[4] && envOutput[4].trim()) {
370370
process.env['GOMODCACHE'] = envOutput[4].trim();
371371
}
372372

0 commit comments

Comments
 (0)