From de2b6c18c2fdbfa01e3d5b352f084f5fa623b8d7 Mon Sep 17 00:00:00 2001 From: tanguylebarzic Date: Mon, 7 May 2018 12:08:34 +0200 Subject: [PATCH] toolsEnvVars: Fix setting of previously unset env variables Was broken in https://github.com/Microsoft/vscode-go/commit/be30dfc597d94194b96ae5a03ca7731a90795e8a (only for toolsEnvVars, testEnvConfig and fileEnv don't suffer from the same issue). --- src/util.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.ts b/src/util.ts index de033cad0..25d544aff 100644 --- a/src/util.ts +++ b/src/util.ts @@ -347,7 +347,7 @@ export function getToolsEnvVars(): any { const envVars = Object.assign({}, process.env, gopath ? { GOPATH: gopath } : {}); if (toolsEnvVars && typeof toolsEnvVars === 'object') { - Object.keys(toolsEnvVars).forEach(key => envVars[key] = typeof envVars[key] === 'string' ? resolvePath(toolsEnvVars[key]) : envVars[key]); + Object.keys(toolsEnvVars).forEach(key => envVars[key] = typeof toolsEnvVars[key] === 'string' ? resolvePath(toolsEnvVars[key]) : toolsEnvVars[key]); } // cgo expects go to be in the path