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

Commit 30ea096

Browse files
committed
Fixes #874 Install delve if OS is not OSX
1 parent 877ca31 commit 30ea096

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/goInstallTools.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ function getTools(goVersion: SemVersion): { [key: string]: string } {
5757
tools['go-langserver'] = 'github.com/sourcegraph/go-langserver';
5858
}
5959

60+
if (process.platform !== 'darwin') {
61+
tools['dlv'] = 'github.com/derekparker/delve/cmd/dlv';
62+
}
6063
return tools;
6164
}
6265

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

0 commit comments

Comments
 (0)