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"')