Skip to content

Commit 2a48579

Browse files
suzmuehyangah
authored andcommitted
[release] src/goDebug: check for undefined launchArgs.packagePathToGoModMap
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 <suzmue@golang.org> Run-TryBot: Suzy Mueller <suzmue@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Quoc Truong <quoct@google.com> (cherry picked from commit 650b8ae) Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/276215 Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> Reviewed-by: Robert Findley <rfindley@google.com>
1 parent 1c396a5 commit 2a48579

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/debugAdapter/goDebug.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,9 @@ export class Delve {
586586
}
587587

588588
const currentGOWorkspace = getCurrentGoWorkspaceFromGOPATH(env['GOPATH'], dirname);
589+
if (!launchArgs.packagePathToGoModPathMap) {
590+
launchArgs.packagePathToGoModPathMap = {};
591+
}
589592
dlvArgs.push(mode || 'debug');
590593
if (mode === 'exec' || (mode === 'debug' && !isProgramDirectory)) {
591594
dlvArgs.push(program);

0 commit comments

Comments
 (0)