Browse Source

Bug fixing

pull/103/head
Unknown 11 years ago
parent
commit
6f55d7e7ba
  1. 7
      cmd/bin.go
  2. 2
      gopm.go

7
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]
}
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:")

2
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,

Loading…
Cancel
Save