Browse Source

Bug fixed

pull/103/head
Unknown 11 years ago
parent
commit
f254e37675
  1. 20
      cmd/bin.go
  2. 2
      gopm.go

20
cmd/bin.go

@ -93,14 +93,18 @@ func runBin(ctx *cli.Context) {
}
// Get code.
stdout, stderr, _ := com.ExecCmd("gopm", "get", "-r", ctx.Args()[0])
if len(stdout) > 0 {
fmt.Print(stdout)
stdout, stderr, err := com.ExecCmd("gopm", "get", "-r", ctx.Args()[0])
if err != nil {
log.Error("bin", "Error occurs when 'gopm get -r':")
log.Fatal("", "\r"+err.Error())
}
if len(stderr) > 0 {
log.Error("bin", "Fail to 'gopm get -r':")
log.Fatal("", "\r"+stderr)
}
if len(stdout) > 0 {
fmt.Print(stdout)
}
// Check if previous steps were successful.
repoPath := installRepoPath + "/" + pkgPath + versionSuffix(ver)
@ -124,14 +128,18 @@ func runBin(ctx *cli.Context) {
}
// Build application.
stdout, stderr, _ = com.ExecCmd("gopm", "build")
if len(stdout) > 0 {
fmt.Print(stdout)
stdout, stderr, err = com.ExecCmd("gopm", "build")
if err != nil {
log.Error("bin", "Error occurs when 'gopm build':")
log.Fatal("", "\r"+err.Error())
}
if len(stderr) > 0 {
log.Error("bin", "Fail to 'gopm build':")
log.Fatal("", "\r"+stderr)
}
if len(stdout) > 0 {
fmt.Print(stdout)
}
defer func() {
// Clean files.
//os.RemoveAll(path.Join(repoPath, doc.VENDOR))

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.3"
const APP_VER = "0.5.7.1205.4"
// //cmd.CmdSearch,
// cmdClean,

Loading…
Cancel
Save