mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 Improve updater on Windows
This commit is contained in:
parent
ca15c14bdb
commit
09f4954f96
2 changed files with 2 additions and 2 deletions
|
|
@ -516,7 +516,7 @@ func Close(force bool, execInstallPkg int) (exitCode int) {
|
||||||
util.PushMsg(Conf.Language(130), 1000*5)
|
util.PushMsg(Conf.Language(130), 1000*5)
|
||||||
// 桌面端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6544
|
// 桌面端退出拉起更新安装时有时需要重启两次 https://github.com/siyuan-note/siyuan/issues/6544
|
||||||
// 这里多等待一段时间,等待安装程序启动
|
// 这里多等待一段时间,等待安装程序启动
|
||||||
time.Sleep(4 * time.Second)
|
time.Sleep(3 * time.Second)
|
||||||
}
|
}
|
||||||
logging.LogInfof("exited kernel")
|
logging.LogInfof("exited kernel")
|
||||||
closeSyncWebSocket()
|
closeSyncWebSocket()
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ func execNewVerInstallPkg(newVerInstallPkgPath string) {
|
||||||
logging.LogInfof("installing the new version [%s]", newVerInstallPkgPath)
|
logging.LogInfof("installing the new version [%s]", newVerInstallPkgPath)
|
||||||
var cmd *exec.Cmd
|
var cmd *exec.Cmd
|
||||||
if gulu.OS.IsWindows() {
|
if gulu.OS.IsWindows() {
|
||||||
cmd = exec.Command(newVerInstallPkgPath)
|
cmd = exec.Command("cmd.exe", "/C", "start", newVerInstallPkgPath)
|
||||||
} else if gulu.OS.IsDarwin() {
|
} else if gulu.OS.IsDarwin() {
|
||||||
exec.Command("chmod", "+x", newVerInstallPkgPath).CombinedOutput()
|
exec.Command("chmod", "+x", newVerInstallPkgPath).CombinedOutput()
|
||||||
cmd = exec.Command("open", newVerInstallPkgPath)
|
cmd = exec.Command("open", newVerInstallPkgPath)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue