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 <[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]>
1 parent 1c396a5 commit 2a48579

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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)