diff --git a/base/cli/runtime.go b/base/cli/runtime.go index 522dba38..d4a19dab 100644 --- a/base/cli/runtime.go +++ b/base/cli/runtime.go @@ -120,6 +120,8 @@ const ( USER = "USER" TERM = "TERM" SHELL = "SHELL" + LANG = "LANG" + TZ = "TZ" ) const ( CTX_SHY = "ctx_shy" @@ -135,7 +137,7 @@ const ( CTX_DAEMON = "ctx_daemon" ) -var ENV_LIST = []string{TERM, SHELL, CTX_SHY, CTX_COM, CTX_DEV, CTX_OPS, CTX_ARG, CTX_PID, CTX_DAEMON} +var ENV_LIST = []string{TZ, LANG, TERM, SHELL, CTX_SHY, CTX_COM, CTX_DEV, CTX_OPS, CTX_ARG, CTX_PID, CTX_DAEMON} const ( HOSTNAME = "hostname" diff --git a/base/web/route.go b/base/web/route.go index 61cf11e2..0a7f7dbc 100644 --- a/base/web/route.go +++ b/base/web/route.go @@ -99,7 +99,7 @@ func init() { case "md5": m.Push(key, ice.Info.Hash) case nfs.SIZE: - m.Push(key, kit.Format("%s/%s", ice.Info.Size, kit.Split(m.Cmdx(cli.SYSTEM, "du", "-sh"))[0])) + m.Push(key, kit.Format("%s/%s", ice.Info.Size, kit.Select("", kit.Split(m.Cmdx(cli.SYSTEM, "du", "-sh")), 0))) case mdb.TYPE: m.Push(key, ice.Info.NodeType) case nfs.PATH: diff --git a/base/web/serve.go b/base/web/serve.go index 05ebfef6..f75d91f2 100644 --- a/base/web/serve.go +++ b/base/web/serve.go @@ -104,9 +104,6 @@ func _serve_handle(key string, cmd *ice.Command, m *ice.Message, w http.Response m.OptionDefault(ice.MSG_HEIGHT, "480", ice.MSG_WIDTH, "320") m.Options(ice.MSG_USERWEB, _serve_domain(m), ice.MSG_USERPOD, m.Option(ice.POD)) m.Options(ice.MSG_USERUA, r.Header.Get(UserAgent), ice.MSG_USERIP, r.Header.Get(ice.MSG_USERIP)) - m.Debug("what %v", m.Option(ice.MSG_USERWEB)) - m.Debug("what %v", CookieName(m.Option(ice.MSG_USERWEB))) - m.Options(ice.MSG_SESSID, kit.Select(m.Option(ice.MSG_SESSID), m.Option(CookieName(m.Option(ice.MSG_USERWEB))))) kit.If(m.Optionv(ice.MSG_CMDS) == nil, func() { kit.If(strings.TrimPrefix(r.URL.Path, key), func(p string) { m.Optionv(ice.MSG_CMDS, strings.Split(p, nfs.PS)) }) diff --git a/misc/git/repos.go b/misc/git/repos.go index 7b383387..e9927fc7 100644 --- a/misc/git/repos.go +++ b/misc/git/repos.go @@ -522,7 +522,7 @@ func init() { if cfg, err := config.LoadConfig(config.GlobalScope); err == nil { if cfg.Author.Email == "" || cfg.Author.Name == "" { opt.Author = &object.Signature{ - Email: kit.Select(m.Option(ice.MSG_USERNAME)+"@163.com", mdb.Config(m, aaa.EMAIL)), + Email: kit.Select(m.Option(ice.MSG_USERNAME)+"@shylinux.com", mdb.Config(m, aaa.EMAIL)), Name: kit.Select(m.Option(ice.MSG_USERNAME), mdb.Config(m, aaa.USERNAME)), When: time.Now(), }