Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Include $PROJECT/bin in $PATH for gb generate #686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cmd/gb/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ See 'go help generate'.
Run: func(ctx *gb.Context, args []string) error {
env := cmd.MergeEnv(os.Environ(), map[string]string{
"GOPATH": fmt.Sprintf("%s%c%s", ctx.Projectdir(), filepath.ListSeparator, filepath.Join(ctx.Projectdir(), "vendor")),
"PATH": fmt.Sprintf("%s%c%s", filepath.Join(ctx.Projectdir(), "bin"), filepath.ListSeparator, os.Getenv("PATH")),
})

cmd := exec.Command("go", append([]string{"generate"}, args...)...)
Expand Down