Skip to content

Commit 1ebebf1

Browse files
Acedusgopherbot
authored andcommitted
cmd/go: clean should respect workspaces
The existing implementation doesn't invoke modload.InitWorkfile during runClean which in turn causes go clean to ignore workspaces and consequentially workspace vendoring. Fixes #74337 Change-Id: I295a1fcc5e81d096971c8cee9c9baa840c7725e7 Reviewed-on: https://go-review.googlesource.com/c/go/+/682856 Reviewed-by: Sam Thanawalla <[email protected]> Auto-Submit: Sam Thanawalla <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Michael Matloob <[email protected]> Reviewed-by: Michael Matloob <[email protected]>
1 parent 6536a93 commit 1ebebf1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cmd/go/internal/clean/clean.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ func init() {
120120
}
121121

122122
func runClean(ctx context.Context, cmd *base.Command, args []string) {
123+
modload.InitWorkfile()
123124
if len(args) > 0 {
124125
cacheFlag := ""
125126
switch {

0 commit comments

Comments
 (0)