Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2023-07-20 23:31:58 +08:00
commit 7eeac4b1a4
3 changed files with 6 additions and 3 deletions

View file

@ -517,7 +517,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
util.PushMsg(Conf.Language(130), 1000*5)
// 桌面端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6544
// 这里多等待一段时间,等待安装程序启动
time.Sleep(3 * time.Second)
time.Sleep(4 * time.Second)
}
logging.LogInfof("exited kernel")
closeSyncWebSocket()

View file

@ -215,6 +215,9 @@ func FindReplace(keyword, replacement string, ids []string, paths, boxes []strin
return
}
keyword = strings.TrimSpace(keyword)
replacement = strings.TrimSpace(replacement)
if keyword == replacement {
return
}

View file

@ -41,13 +41,13 @@ func execNewVerInstallPkg(newVerInstallPkgPath string) {
logging.LogInfof("installing the new version [%s]", newVerInstallPkgPath)
var cmd *exec.Cmd
if gulu.OS.IsWindows() {
cmd = exec.Command("cmd.exe", "/C", "start", newVerInstallPkgPath)
cmd = exec.Command(newVerInstallPkgPath)
} else if gulu.OS.IsDarwin() {
exec.Command("chmod", "+x", newVerInstallPkgPath).CombinedOutput()
cmd = exec.Command("open", newVerInstallPkgPath)
}
gulu.CmdAttr(cmd)
cmdErr := cmd.Start()
cmdErr := cmd.Run()
if nil != cmdErr {
logging.LogErrorf("exec install new version failed: %s", cmdErr)
return