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

Fixes #592 Use go from GOROOT while installing tools #594

Merged
merged 1 commit into from
Nov 1, 2016

Conversation

ramya-rao-a
Copy link
Contributor

@ramya-rao-a ramya-rao-a commented Nov 1, 2016

We have been using Go from GOROOT (falling back to PATH if not found) everywhere while running the go command except while installing tools.
This PR will fix that
Fixes #592

@@ -110,7 +110,8 @@ function installTools(goVersion: SemVersion, missing?: string[]) {

missing.reduce((res: Promise<string[]>, tool: string) => {
return res.then(sofar => new Promise<string[]>((resolve, reject) => {
cp.exec('go get -u -v ' + tools[tool], { env: process.env }, (err, stdout, stderr) => {
let goRuntimePath = getGoRuntimePath();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You would probably only need to lookup the goRuntimePath once during the install phase so to improve performance move it above the reduce function.

@ramya-rao-a ramya-rao-a merged commit 9174b4d into microsoft:master Nov 1, 2016
@ramya-rao-a ramya-rao-a deleted the use-goroot branch January 22, 2017 07:56
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Install tools does not use go.goroot project setting.
4 participants