Closed koddr closed 4 years ago
@markbates I'm seeing similar behavior. The app works fine if I run the binary from same root as my go.mod
, but not from outside that path.
@koddr this is a dupe of https://github.com/markbates/pkger/issues/38
To summarize, adding pkger -o cmd/foo
where cmd/foo
is the path fed to go install did the trick for me.
For what it's worth, it's still a little unintuitive. I have to run pkger
in the root directory first, and then run pkger -o cmd/foo
to get the behavior I would expect. My repo is public if you care to take a look. Makefile here: https://github.com/EvanBoyle/pupiter/blob/master/Makefile
@EvanBoyle thanks for solution! It works fine :+1:
Hi!
I'm using Go
1.13.5
.On my
./cmd/myapp/main.go
:App structure:
I packed my app like this:
If I run binary
./myapp
from folder — all okay. Files from./config
was copied.But, if I run
$ go install ./cmd/myapp
and call binary (who installed to$GOPATH/bin
) as usual, by$ myapp [args]
, I got this error:What's wrong? How to solve this? Help me please 😞