diff --git a/base/cli/system.go b/base/cli/system.go index 35831bbf..01782898 100644 --- a/base/cli/system.go +++ b/base/cli/system.go @@ -113,7 +113,6 @@ func _system_exec(m *ice.Message, cmd *exec.Cmd) { if e := cmd.Run(); !m.Warn(e, ice.ErrNotFound, cmd.Args) { m.Cost(CODE, cmd.ProcessState.ExitCode(), ctx.ARGS, cmd.Args) } - m.Push(mdb.TIME, m.Time()).Push(CODE, int(cmd.ProcessState.ExitCode())) } diff --git a/base/web/option.go b/base/web/option.go index 067e487e..d74f0717 100644 --- a/base/web/option.go +++ b/base/web/option.go @@ -90,11 +90,13 @@ func GoToast(m *ice.Message, title string, cb func(toast func(string, int, int)) }) }) } -func PushStream(m *ice.Message) { +func PushStream(m *ice.Message, cmds ...ice.Any) *ice.Message { m.Option(cli.CMD_OUTPUT, file.NewWriteCloser(func(buf []byte) (int, error) { PushNoticeGrow(m, string(buf)) return len(buf), nil }, func() error { PushNoticeToast(m, "done"); return nil })) + m.ProcessHold() + return m.Cmd(cmds...) } func PushPodCmd(m *ice.Message, cmd string, arg ...string) { if m.Length() > 0 && len(m.Appendv(ice.POD)) == 0 { diff --git a/misc/git/status.go b/misc/git/status.go index ac435213..80ec6e3b 100644 --- a/misc/git/status.go +++ b/misc/git/status.go @@ -236,9 +236,7 @@ func init() { _status_each(m, PULL, cli.SYSTEM, GIT, PULL) }}, MAKE: {Name: "make", Help: "编译", Hand: func(m *ice.Message, arg ...string) { - web.PushStream(m) - m.Cmdy(cli.SYSTEM, MAKE) - web.ToastSuccess(m) + web.PushStream(m, cli.SYSTEM, MAKE) }}, PUSH: {Name: "push", Help: "上传", Hand: func(m *ice.Message, arg ...string) { if m.Option(REPOS) == "" { @@ -324,7 +322,7 @@ func init() { if len(arg) == 0 { m.Action(PULL, MAKE, PUSH, TAGS, PIE, code.PUBLISH) files, adds, dels, last := _status_list(m) - m.Status("files", files, "adds", adds, "dels", dels, "last", last.Format(ice.MOD_TIME)) + m.Status("repos", m.Length(), "files", files, "adds", adds, "dels", dels, "last", last.Format(ice.MOD_TIME)) web.Toast3s(m, kit.Format("files: %d, adds: %d, dels: %d", files, adds, dels), ice.CONTEXTS) return }