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

Commit

Permalink
Fixes #874 Install delve if OS is not OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a committed Mar 19, 2017
1 parent 877ca31 commit 30ea096
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/goInstallTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ function getTools(goVersion: SemVersion): { [key: string]: string } {
tools['go-langserver'] = 'github.com/sourcegraph/go-langserver';
}

if (process.platform !== 'darwin') {
tools['dlv'] = 'github.com/derekparker/delve/cmd/dlv';
}
return tools;
}

Expand Down Expand Up @@ -152,8 +155,9 @@ function installTools(goVersion: SemVersion, missing?: string[]) {
missing.reduce((res: Promise<string[]>, tool: string) => {
return res.then(sofar => new Promise<string[]>((resolve, reject) => {
// gometalinter expects its linters to be in the user's GOPATH
// Therefore, cannot use an isolated GOPATH for installing gometalinter
let env = (envWithSeparateGoPathForTools && tool !== 'gometalinter') ? envWithSeparateGoPathForTools : envForTools;
// Debugger doesnt have access to settings, so cannot read `go.toolsGopath`
// Therefore, cannot use an isolated GOPATH for installing gometalinter or dlv
let env = (envWithSeparateGoPathForTools && tool !== 'gometalinter' && tool !== 'dlv') ? envWithSeparateGoPathForTools : envForTools;
cp.execFile(goRuntimePath, ['get', '-u', '-v', tools[tool]], { env }, (err, stdout, stderr) => {
if (err) {
outputChannel.appendLine('Installing ' + tool + ' FAILED');
Expand Down

0 comments on commit 30ea096

Please sign in to comment.