What version of Go are you using? On Wednesday, March 10, 2021 at 6:20:50 PM UTC-5 mattm...@gmail.com wrote:
> Thanks for the message! Unfortunately, > > GOBIN=$GOPATH/bin go install ./cmd/app/main.go > > Doesn't change anything. Actually I'm realizing that even without go > modules but with $GOPATH this never installed anywhere: > > GOBIN=$GOPATH/bin GO111MODULE=off go install ./cmd/testinstall/main.go > > You have to do: > > cd ./cmd/app && go install > > Then it appears to work in all cases. > > I'm assuming this is by design, but it feels to me like go install > ./cmd/app/main.go silently failing is a bug. > > Is this worth opening an issue for? > > > On Thursday, March 11, 2021 at 12:08:09 AM UTC+1 Kurtis Rader wrote: > >> Do you have environment var GOBIN set? Check the output of "go env >> GOBIN". See https://golang.org/ref/mod#mod-commands. >> >> On Wed, Mar 10, 2021 at 2:59 PM Matt Mueller <mattm...@gmail.com> wrote: >> >>> Hey folks, >>> >>> I'm trying to install a command inside a module globally on my system so >>> that I can use that binary elsewhere. During the $GOPATH era this worked >>> something like this: >>> >>> go install cmd/app/main.go >>> // installed app to $GOPATH/bin >>> >>> Unfortunately that doesn't seem to work anymore. It doesn't error, but I >>> don't know where it installed the binary. Not in $GOPATH/bin. >>> >>> I've read the documentation for `go help install`. It pointed me to `go >>> help modules`, but then I got lost after that. >>> >>> Any pointers would be greatly appreciated. Thanks! >>> >>> Matt >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "golang-nuts" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to golang-nuts...@googlegroups.com. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/golang-nuts/ad5e444b-7d40-464b-9848-e2135d1788e0n%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/golang-nuts/ad5e444b-7d40-464b-9848-e2135d1788e0n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> Kurtis Rader >> Caretaker of the exceptional canines Junior and Hank >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/e3c00009-41ce-4a39-864f-8a39070f7218n%40googlegroups.com.