diff --git a/cmd/bin.go b/cmd/bin.go index ad257ab95..41b688cd7 100644 --- a/cmd/bin.go +++ b/cmd/bin.go @@ -145,14 +145,14 @@ func runBin(ctx *cli.Context) { _, pkgName = filepath.Split(pkgPath) } + // Because build command moved binary to root path. binName := path.Base(pkgName) if runtime.GOOS == "windows" { binName += ".exe" } - binPath := path.Join(doc.VENDOR, "src", pkgName, binName) - if !com.IsFile(binPath) { + if !com.IsFile(binName) { log.Error("bin", "Binary does not exist:") - log.Error("", "\t"+binPath) + log.Error("", "\t"+binName) log.Fatal("", "\tPrevious steps weren't successful or the project does not contain main package") } @@ -161,8 +161,12 @@ func runBin(ctx *cli.Context) { if ctx.Bool("dir") { movePath = ctx.Args()[1] } - os.Remove(movePath + "/" + binName) - err = os.Rename(binPath, movePath+"/"+binName) + err = os.Remove(movePath + "/" + binName) + if err != nil { + log.Warn("Cannot remove binary in work directory:") + log.Warn("\t %s", err) + } + err = os.Rename(binName, movePath+"/"+binName) if err != nil { log.Error("bin", "Fail to move binary:") log.Fatal("", "\t"+err.Error()) diff --git a/gopm.go b/gopm.go index 6f3cba5aa..5625a4489 100644 --- a/gopm.go +++ b/gopm.go @@ -29,7 +29,7 @@ import ( // Test that go1.1 tag above is included in builds. main.go refers to this definition. const go11tag = true -const APP_VER = "0.5.7.1205" +const APP_VER = "0.5.7.1205.1" // //cmd.CmdSearch, // cmdClean,