From cc8d3377debd8013e76e88e51ec2192a51ecf280 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 5 Dec 2013 08:08:40 -0500 Subject: [PATCH] Added stderr output --- cmd/bin.go | 15 +++++++++++---- gopm.go | 2 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/cmd/bin.go b/cmd/bin.go index 730e3dcc1..79d8975fb 100644 --- a/cmd/bin.go +++ b/cmd/bin.go @@ -93,14 +93,17 @@ func runBin(ctx *cli.Context) { } // Get code. - stdout, _, _ := com.ExecCmd("gopm", "get", "-r", ctx.Args()[0]) + stdout, stderr, _ := com.ExecCmd("gopm", "get", "-r", ctx.Args()[0]) if len(stdout) > 0 { fmt.Print(stdout) } + if len(stderr) > 0 { + log.Error("bin", "Fail to 'gopm get -r':") + log.Fatal("", "\r"+stderr) + } // Check if previous steps were successful. - repoPath := strings.Replace(installRepoPath+"/"+pkgPath+versionSuffix(ver), - "\\", "/", -1) + repoPath := installRepoPath + "/" + pkgPath + versionSuffix(ver) if !com.IsDir(repoPath) { log.Error("bin", "Cannot continue command:") log.Fatal("", "\tPrevious steps weren't successful") @@ -121,10 +124,14 @@ func runBin(ctx *cli.Context) { } // Build application. - stdout, _, _ = com.ExecCmd("gopm", "build") + stdout, stderr, _ = com.ExecCmd("gopm", "build") if len(stdout) > 0 { fmt.Print(stdout) } + if len(stderr) > 0 { + log.Error("bin", "Fail to 'gopm build':") + log.Fatal("", "\r"+stderr) + } defer func() { // Clean files. //os.RemoveAll(path.Join(repoPath, doc.VENDOR)) diff --git a/gopm.go b/gopm.go index eb7824b68..c70807567 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.2" +const APP_VER = "0.5.7.1205.3" // //cmd.CmdSearch, // cmdClean,