Skip to content

Commit

Permalink
fix macos updater
Browse files Browse the repository at this point in the history
  • Loading branch information
pompurin404 committed Oct 8, 2024
1 parent 371eca5 commit bb546bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/resolve/autoUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ export async function downloadAndInstallUpdate(version: string): Promise<void> {
`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"')
Expand Down

0 comments on commit bb546bd

Please sign in to comment.