From ccc03c8ae0e8a915da722fa56a7d5d85c7efe9f1 Mon Sep 17 00:00:00 2001 From: pompurin404 Date: Tue, 8 Oct 2024 21:59:01 +0800 Subject: [PATCH] fix macos updater --- src/main/resolve/autoUpdater.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resolve/autoUpdater.ts b/src/main/resolve/autoUpdater.ts index 4286803..afcea33 100644 --- a/src/main/resolve/autoUpdater.ts +++ b/src/main/resolve/autoUpdater.ts @@ -95,11 +95,11 @@ export async function downloadAndInstallUpdate(version: string): Promise { `hdiutil attach "${path.join(dataDir(), file)}" -mountpoint "/Volumes/mihomo-party" -nobrowse` ) try { - await execPromise(`mv /Applications/${name}.app /tmp`) + await execPromise(`mv "/Applications/${name}.app" /tmp`) await execPromise('cp -R "/Volumes/mihomo-party/Mihomo Party.app" /Applications/') - await execPromise(`rm -rf /tmp/${name}.app`) + await execPromise(`rm -rf "/tmp/${name}.app"`) } catch (e) { - await execPromise(`mv /tmp/${name}.app /Applications`) + await execPromise(`mv "/tmp/${name}.app" /Applications`) throw e } finally { await execPromise('hdiutil detach "/Volumes/mihomo-party"')