Skip to content

Commit

Permalink
修复安装版cfw更新完成后无法退出的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Jan 18, 2022
1 parent 0f92cdc commit a7edd9e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ func updateProcess(diList []*downloadInfo, stopCh chan struct{}) {
}
if ci.installVersion {
if updateCore {
exec.Command(fullPath(diList[0].fileFullName), "/S").Run()
startBackground()
go exec.Command(fullPath(diList[0].fileFullName), "/S").Run()
for {
if check := checkCfw(); check != nil {
check.process.Kill()
Expand Down Expand Up @@ -156,7 +157,9 @@ func updateCfw(diList []*downloadInfo) {
}
updateProcess(diList, stopCh)
if updateCore || updateTrans {
startBackground()
if !ci.installVersion {
startBackground()
}
go exec.Command(path.Join(ci.rootPath, "Clash for Windows.exe")).Run()
for {
if checkCfw() != nil {
Expand Down

0 comments on commit a7edd9e

Please sign in to comment.