Skip to content

Commit

Permalink
优化mac版updater更新
Browse files Browse the repository at this point in the history
  • Loading branch information
Jrohy committed Jan 29, 2022
1 parent 6d66186 commit 3cca6a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions update.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ func updateUpdater() {
oldName := strings.ReplaceAll(downloadFileName, "cfw-updater", "old")
newName := strings.ReplaceAll(downloadFileName, "cfw-updater", "new")
downloadFile(fmt.Sprintf("https://github.com/Jrohy/cfw-updater/releases/download/%s/%s", updaterVersion, downloadFileName), newName)
if runtime.GOOS == "darwin" {
exec.Command("chmod", "+x", newName).Run()
}
startBackground()
os.Rename(execName, oldName)
os.Rename(newName, execName)
Expand Down

0 comments on commit 3cca6a2

Please sign in to comment.