An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:bug: 桌面端拉起自动更新安装包偶尔失败 Fix https://github.com/siyuan-note/siyuan/issues/5996
Liang Ding400fc166b2c6
diff --git a/kernel/model/conf.go b/kernel/model/conf.goindex cd2145592b..b66b8333fe 100644--- a/kernel/model/conf.go+++ b/kernel/model/conf.go@@ -379,6 +379,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {// return true//})+ waitSecondForExecInstallPkg := falseif !skipNewVerInstallPkg() {newVerInstallPkgPath := getNewVerInstallPkgPath()if "" != newVerInstallPkgPath {@@ -387,6 +388,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {logging.LogInfof("the new version install pkg is ready [%s], waiting for the user's next instruction", newVerInstallPkgPath)return} else if 2 == execInstallPkg { // 执行新版本安装+ waitSecondForExecInstallPkg = truego execNewVerInstallPkg(newVerInstallPkgPath)}}@@ -398,6 +400,9 @@ func Close(force bool, execInstallPkg int) (exitCode int) {go func() {time.Sleep(500 * time.Millisecond)+ if waitSecondForExecInstallPkg {+ time.Sleep(1 * time.Second)+ }logging.LogInfof("exited kernel")util.WebSocketServer.Close()os.Exit(util.ExitCodeOk)diff --git a/kernel/model/updater.go b/kernel/model/updater.goindex 26b3c9e91b..37eb39e16d 100644--- a/kernel/model/updater.go+++ b/kernel/model/updater.go@@ -46,12 +46,11 @@ func execNewVerInstallPkg(newVerInstallPkgPath string) {cmd = exec.Command("sh", "-c", newVerInstallPkgPath)}util.CmdAttr(cmd)- data, cmdErr := cmd.CombinedOutput()+ cmdErr := cmd.Start()if nil != cmdErr {logging.LogErrorf("exec install new version failed: %s", cmdErr)return}- logging.LogInfof("installed new version output [%s]", data)}func getNewVerInstallPkgPath() string {