Skip to content

cmd/go: clean -modcache only operates inside a module #26596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zombiezen opened this issue Jul 25, 2018 · 2 comments
Closed

cmd/go: clean -modcache only operates inside a module #26596

zombiezen opened this issue Jul 25, 2018 · 2 comments
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@zombiezen
Copy link
Contributor

What version of Go are you using (go version)?

go version go1.10.3 linux/amd64 vgo:devel +88c76dcbab

(vgo is at 20939850793927db78c179dcfcd5d4d6f44f2c01)

What operating system and processor architecture are you using (go env)?

linux/amd64

What did you do?

I ran vgo clean -modcache outside of a module.

What did you expect to see?

The mod directory is made empty.

What did you see instead?

vgo exited with the following error:

go: cannot find main module root; see 'go help modules'
@gopherbot gopherbot added this to the vgo milestone Jul 25, 2018
@bcmills bcmills changed the title x/vgo: clean -modcache only operates inside a module cmd/go: clean -modcache only operates inside a module Jul 25, 2018
@bcmills bcmills modified the milestones: vgo, Go1.11 Jul 25, 2018
@bcmills bcmills added NeedsFix The path to resolution is known, but the work has not been done. modules labels Jul 25, 2018
@gopherbot
Copy link
Contributor

Change https://golang.org/cl/126115 mentions this issue: cmd/go/internal/clean: support "clean -modcache" operates outside a module

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/126655 mentions this issue: cmd/go: split go mod into multiple subcommands

@golang golang locked and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants