Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/go: 'install' succeeds without a main module when given a non-main package #30053
https://go-review.googlesource.com/c/go/+/148517 works great, for the most part. I found this behavior, which confused me a bit.
Sounds to me like this should error;
@rogpeppe points out that the root directory is a non-main package with some files, so the commands were actually doing something - presumably filling up the build cache.
However, perhaps there should be a way to globally say "install this binary", which would error if erroneously given non-main packages. I had run the wrong command, and I was confused for a while as to why no binary was being installed.
But perhaps it's just me who has been confused by this :)