diff --git a/realize/cli.go b/realize/cli.go index 28a36b5..24982f3 100644 --- a/realize/cli.go +++ b/realize/cli.go @@ -65,7 +65,8 @@ func init() { if build.Default.GOPATH == "" { log.Fatal("$GOPATH isn't set properly") } - if err := os.Setenv("GOBIN", filepath.Join(build.Default.GOPATH, "bin")); err != nil { + path := filepath.SplitList(build.Default.GOPATH) + if err := os.Setenv("GOBIN", filepath.Join(path[len(path)-1], "bin")); err != nil { log.Fatal(err) } } diff --git a/realize/projects.go b/realize/projects.go index 993f080..3017272 100644 --- a/realize/projects.go +++ b/realize/projects.go @@ -582,6 +582,9 @@ func (p *Project) run(path string, stream chan Response, stop <-chan bool) (err name = filepath.Base(dirPath) } path = filepath.Join(dirPath, name) + if p.Tools.Run.Method != "" { + path = p.Tools.Run.Method + } if _, err := os.Stat(path); err == nil { build = exec.Command(path, args...) } else if _, err := os.Stat(path + RExtWin); err == nil {