Browse Source

Added -v for gopm bin when user uses -v in gopm update

pull/103/head
Unknown 11 years ago
parent
commit
392441d4a4
  1. 9
      cmd/update.go

9
cmd/update.go

@ -111,9 +111,14 @@ func runUpdate(ctx *cli.Context) {
os.MkdirAll(tmpDirPath, os.ModePerm) os.MkdirAll(tmpDirPath, os.ModePerm)
os.Remove(tmpBinPath) os.Remove(tmpBinPath)
// Fetch code. // Fetch code.
stdout, stderr, err := com.ExecCmd("gopm", "bin", "-u", "-d", args := []string{"bin", "-u", "-d"}
"github.com/gpmgo/gopm", tmpDirPath) 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 { if err != nil {
log.Error("Update", "Fail to execute 'gopm bin -u -d github.com/gpmgo/gopm "+tmpDirPath+"'") log.Error("Update", "Fail to execute 'gopm bin -u -d github.com/gpmgo/gopm "+tmpDirPath+"'")
log.Fatal("", err.Error()) log.Fatal("", err.Error())

Loading…
Cancel
Save