From 3cca6a29fbd310db9d887d9110d3b4c77d1044b4 Mon Sep 17 00:00:00 2001 From: Jrohy Date: Sat, 29 Jan 2022 10:25:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96mac=E7=89=88updater=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/update.go b/update.go index f2347c5..1845999 100644 --- a/update.go +++ b/update.go @@ -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)