Skip to content

Commit c734170

Browse files
committed
internal/lsp: cleanup temporary go.mod file on shutdown
This commit will delete the temporary go.mod file that is attached to a view when the session is shutdown. Updates golang/go#31999 Change-Id: I0f6b0663b0a814ce45d9b12468669f415f8c36aa Reviewed-on: https://go-review.googlesource.com/c/tools/+/212479 Reviewed-by: Rebecca Stambler <[email protected]> Run-TryBot: Rohan Challa <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent a7b3459 commit c734170

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/lsp/cache/view.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,9 @@ func (v *view) shutdown(context.Context) {
304304
v.cancel()
305305
v.cancel = nil
306306
}
307+
if v.modfiles != nil {
308+
os.Remove(v.modfiles.temp)
309+
}
307310
debug.DropView(debugView{v})
308311
}
309312

0 commit comments

Comments
 (0)