Skip to content
This repository has been archived by the owner on Jun 25, 2022. It is now read-only.

packr2 does not respect go build's module path #292

Open
jeromegn opened this issue Jul 12, 2021 · 0 comments
Open

packr2 does not respect go build's module path #292

jeromegn opened this issue Jul 12, 2021 · 0 comments

Comments

@jeromegn
Copy link

jeromegn commented Jul 12, 2021

I'm running into the following issue:

$ packr2 build -v --tags "json1" -ldflags="-X 'main.Version=1.0.0.0-dev'" -o bin/flyd ./cmd/flyd
// tons of logs
// ...
DEBU[2021-07-12T11:09:17-04:00] go build -v --tags json1 -ldflags=-X 'main.Version=1.0.0.0-dev' -o bin/flyd flyd
package flyd is not in GOROOT (/usr/lib/go/src/flyd)
Error: exit status 1

Note the path (./cmd/flyd) I'm trying to build is changed in the go build invocation from packr2.

Edit: my current workaround is to go build with the same arguments, but the correct path, right after this, ignoring the error.

@sio4 sio4 pinned this issue Jun 25, 2022
@sio4 sio4 unpinned this issue Jun 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant