From f310a782c46f708e93daa689806c1e043fc9ef35 Mon Sep 17 00:00:00 2001 From: shy Date: Sun, 7 Apr 2024 02:06:43 +0800 Subject: [PATCH] opt some --- conf.go | 2 +- core/code/version.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/conf.go b/conf.go index 88b775b9..8ff7d4aa 100644 --- a/conf.go +++ b/conf.go @@ -117,7 +117,7 @@ const ( // DIR PLUGIN_LOCAL = "/plugin/local/" PLUGIN_STORY = "/plugin/story/" PLUGIN_TABLE_JS = "/plugin/table.js" - PKG_MOD = "/pkd/mod/" + PKG_MOD = "/pkg/mod/" ISH_PLUGED = ".ish/pluged/" USR_INSTALL = "usr/install/" diff --git a/core/code/version.go b/core/code/version.go index f953f3a0..b89b4234 100644 --- a/core/code/version.go +++ b/core/code/version.go @@ -29,8 +29,9 @@ func init() { }}, SYNC: {Help: "同步", Hand: func(m *ice.Message, arg ...string) { repos := map[string]string{} - m.Cmds(web.CODE_GIT_STATUS).Table(func(value ice.Maps) { repos[strings.Split(value[web.ORIGIN], "://")[1]] = value[nfs.VERSION] }) + m.Cmds(web.CODE_GIT_REPOS).Table(func(value ice.Maps) { repos[strings.Split(value[web.ORIGIN], "://")[1]] = value[nfs.VERSION] }) m.Cmd(web.CODE_MOD, mdb.RENDER, MOD, ice.GO_MOD, nfs.PWD).Table(func(value ice.Maps) { repos[value[REQUIRE]] = value[VERSION] }) + m.Debug("what %v", kit.Formats(repos)) res := m.Cmdx(nfs.CAT, path.Join(nfs.USR_LOCAL_WORK, m.Option(SPACE), ice.GO_MOD), func(ls []string, text string) string { if len(ls) > 1 { if v, ok := repos[ls[0]]; ok && !strings.Contains(v, "-") {