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

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

@jeromegn

Description

@jeromegn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions