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

Commit

Permalink
When using GOBIN, the message should reflect the same
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Jan 28, 2020
1 parent 8660153 commit 83e3360
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,13 @@ export function installTools(missing: Tool[], goVersion: GoVersion): Promise<voi
return;
}

let binpath = toolsGopath + path.sep + "bin";
if(envForTools['GOBIN'] != undefined && envForTools['GOBIN'] != ''){
binpath = "GOBIN path " + envForTools['GOBIN']
let installingMsg = `Installing ${missing.length} ${missing.length > 1 ? 'tools' : 'tool'} at `;
if (envForTools['GOBIN']) {
installingMsg += `the configured GOBIN: ${envForTools['GOBIN']}`;
} else {
installingMsg += toolsGopath + path.sep + 'bin';
}

let installingMsg = `Installing ${missing.length} ${missing.length > 1 ? 'tools' : 'tool'} at ${binpath}`;

// If the user is on Go >= 1.11, tools should be installed with modules enabled.
// This ensures that users get the latest tagged version, rather than master,
// which may be unstable.
Expand Down
2 changes: 1 addition & 1 deletion src/goPath.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function getBinPathWithPreferredGopath(toolName: string, preferredGopaths
binPathCache[toolName] = pathFromGoBin;
return pathFromGoBin;
}

for (const preferred of preferredGopaths) {
if (typeof preferred === 'string') {
// Search in the preferred GOPATH workspace's bin folder
Expand Down

0 comments on commit 83e3360

Please sign in to comment.