]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.13] cmd/cover: skip go list when profile is empty
authorRhys Hiltner <rhys@justin.tv>
Thu, 29 Aug 2019 16:49:36 +0000 (09:49 -0700)
committerBryan C. Mills <bcmills@google.com>
Tue, 24 Sep 2019 19:15:09 +0000 (19:15 +0000)
commit7d1c61cde532d60fcaa188a42e5479f930035018
tree777c26331a83fd30e1a445c75714cff9be15ac60
parent37f1dd97f7bbbc6a78bccc06cb49a4ae612d2657
[release-branch.go1.13] cmd/cover: skip go list when profile is empty

Only call "go list" when explicitly listing packages. An empty coverage
profile references no packages, and would otherwise lead to "go list"
implicitly looking at the package in "." (which might not exist).

Fixes #33984

Change-Id: I02d4e374405d86f03d105fe14648aa03b4d2284c
Reviewed-on: https://go-review.googlesource.com/c/go/+/192340
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 9d480edadc6144d9f9f5a896d729d1642e46083b)
Reviewed-on: https://go-review.googlesource.com/c/go/+/192722
src/cmd/cover/func.go
src/cmd/go/testdata/script/cover_mod_empty.txt [new file with mode: 0644]