From 392441d4a4104a8d163a540bda0da7f1c1550b13 Mon Sep 17 00:00:00 2001 From: Unknown Date: Wed, 15 Jan 2014 17:19:32 +0800 Subject: [PATCH] Added -v for gopm bin when user uses -v in gopm update --- cmd/update.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd/update.go b/cmd/update.go index 5f9529d27..af7d4191f 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -111,9 +111,14 @@ func runUpdate(ctx *cli.Context) { os.MkdirAll(tmpDirPath, os.ModePerm) os.Remove(tmpBinPath) + // Fetch code. - stdout, stderr, err := com.ExecCmd("gopm", "bin", "-u", "-d", - "github.com/gpmgo/gopm", tmpDirPath) + args := []string{"bin", "-u", "-d"} + if ctx.Bool("verbose") { + args = append(args, "-v") + } + args = append(args, []string{"github.com/gpmgo/gopm", tmpDirPath}...) + stdout, stderr, err := com.ExecCmd("gopm", args...) if err != nil { log.Error("Update", "Fail to execute 'gopm bin -u -d github.com/gpmgo/gopm "+tmpDirPath+"'") log.Fatal("", err.Error())