mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
fix macos updater
This commit is contained in:
parent
9be085dd90
commit
ccc03c8ae0
@ -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"')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user