diff --git a/cmd/bin.go b/cmd/bin.go index 79d8975fb..2c1129fa3 100644 --- a/cmd/bin.go +++ b/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)) diff --git a/gopm.go b/gopm.go index c70807567..49112581e 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.3" +const APP_VER = "0.5.7.1205.4" // //cmd.CmdSearch, // cmdClean,