From 3c64ecf27a44a76fb69c65244b0e625944f80d8a Mon Sep 17 00:00:00 2001 From: shaoying Date: Tue, 7 Aug 2018 21:53:17 +0800 Subject: [PATCH] tce add some --- src/contexts/ctx.go | 2 +- src/contexts/nfs/nfs.go | 11 ++--------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/contexts/ctx.go b/src/contexts/ctx.go index 9c0b4d01..d43346e4 100644 --- a/src/contexts/ctx.go +++ b/src/contexts/ctx.go @@ -2407,7 +2407,7 @@ var Index = &Context{Name: "ctx", Help: "模块中心", msg.Cmd(arg) m.Meta["result"] = append(m.Meta["result"], msg.Meta["result"]...) m.Copy(msg, "append") - m.target = msg.target + // m.target = msg.target } } // }}} diff --git a/src/contexts/nfs/nfs.go b/src/contexts/nfs/nfs.go index 3e3793d8..e684474c 100644 --- a/src/contexts/nfs/nfs.go +++ b/src/contexts/nfs/nfs.go @@ -1265,15 +1265,8 @@ var Index = &ctx.Context{Name: "nfs", Help: "存储中心", } m.Log("info", "cmd: %s %v", "git", ctx.Trans("-C", p, c, args)) - cmd := exec.Command("git", ctx.Trans("-C", p, c, args)...) - if out, e := cmd.CombinedOutput(); e != nil { - m.Echo("error: ") - m.Echo("%s\n", e) - } else { - if m.Echo(string(out)); len(out) > 0 { - m.Echo("\n") - } - } + msg := m.Sess("cli").Cmd("system", "git", "-C", p, c, args) + m.Copy(msg, "result").Copy(msg, "append") } } // }}} }},