diff --git a/cmd/bin.go b/cmd/bin.go index 41b688cd7..730e3dcc1 100644 --- a/cmd/bin.go +++ b/cmd/bin.go @@ -99,7 +99,8 @@ func runBin(ctx *cli.Context) { } // Check if previous steps were successful. - repoPath := installRepoPath + "/" + pkgPath + versionSuffix(ver) + repoPath := strings.Replace(installRepoPath+"/"+pkgPath+versionSuffix(ver), + "\\", "/", -1) if !com.IsDir(repoPath) { log.Error("bin", "Cannot continue command:") log.Fatal("", "\tPrevious steps weren't successful") @@ -161,11 +162,15 @@ func runBin(ctx *cli.Context) { if ctx.Bool("dir") { movePath = ctx.Args()[1] } - err = os.Remove(movePath + "/" + binName) - if err != nil { - log.Warn("Cannot remove binary in work directory:") - log.Warn("\t %s", err) + + if com.IsExist(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:") diff --git a/gopm.go b/gopm.go index 5625a4489..eb7824b68 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.1" +const APP_VER = "0.5.7.1205.2" // //cmd.CmdSearch, // cmdClean,