Skip to content

Commit

Permalink
[release] src/goDebug: check for undefined launchArgs.packagePathToGo…
Browse files Browse the repository at this point in the history
…ModMap

Add a sanity check that launchArgs.packagePathToGoModPathMap is not
undefined.

Updates #982

Change-Id: Id7470268c6beaf3e7656e16a1d07fb7ea6d80cca
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/274932
Trust: Suzy Mueller <[email protected]>
Run-TryBot: Suzy Mueller <[email protected]>
TryBot-Result: kokoro <[email protected]>
Reviewed-by: Quoc Truong <[email protected]>
(cherry picked from commit 650b8ae)
Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276215
Trust: Hyang-Ah Hana Kim <[email protected]>
Run-TryBot: Hyang-Ah Hana Kim <[email protected]>
Reviewed-by: Robert Findley <[email protected]>
  • Loading branch information
suzmue authored and hyangah committed Dec 8, 2020
1 parent 1c396a5 commit 2a48579
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/debugAdapter/goDebug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,9 @@ export class Delve {
}

const currentGOWorkspace = getCurrentGoWorkspaceFromGOPATH(env['GOPATH'], dirname);
if (!launchArgs.packagePathToGoModPathMap) {
launchArgs.packagePathToGoModPathMap = {};
}
dlvArgs.push(mode || 'debug');
if (mode === 'exec' || (mode === 'debug' && !isProgramDirectory)) {
dlvArgs.push(program);
Expand Down

0 comments on commit 2a48579

Please sign in to comment.