Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Commit

Permalink
Fixing #1510
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Feb 11, 2018
1 parent f89d2b5 commit 2989363
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 0.6.75 - 10th February, 2018
## 0.6.76 - 10th February, 2018

* [Bug 1449](https://github.com/Microsoft/vscode-go/issues/1449): Rename fails due to cgo not being able to find the go executable.
* [Bug 1508](https://github.com/Microsoft/vscode-go/issues/1508): Broken Path in Windows when running Go tools
Expand Down
Binary file modified Go-latest.vsix
Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Go",
"version": "0.6.75",
"version": "0.6.76",
"publisher": "lukehoban",
"description": "Rich Go language support for Visual Studio Code",
"author": {
Expand Down
9 changes: 7 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,13 @@ export function getToolsEnvVars(): any {

// cgo expects go to be in the path
const goroot: string = envVars['GOROOT'];
const pathEnvVar = process.env['PATH'] ? 'PATH' : ((process.platform === 'win32' && process.env['Path']) ? 'Path' : null);
if (goroot && pathEnvVar && (<string>envVars[pathEnvVar]).split(path.delimiter).indexOf(goroot) === -1) {
let pathEnvVar: string;
if (envVars.hasOwnProperty('PATH')) {
pathEnvVar = 'PATH'
} else if (process.platform === 'win32' && envVars.hasOwnProperty('Path')) {
pathEnvVar = 'Path';
}
if (goroot && pathEnvVar && envVars[pathEnvVar] && (<string>envVars[pathEnvVar]).split(path.delimiter).indexOf(goroot) === -1) {
envVars[pathEnvVar] += path.delimiter + path.join(goroot, 'bin');
}

Expand Down

0 comments on commit 2989363

Please sign in to comment.