mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 05:00: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`
|
`hdiutil attach "${path.join(dataDir(), file)}" -mountpoint "/Volumes/mihomo-party" -nobrowse`
|
||||||
)
|
)
|
||||||
try {
|
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('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) {
|
} catch (e) {
|
||||||
await execPromise(`mv /tmp/${name}.app /Applications`)
|
await execPromise(`mv "/tmp/${name}.app" /Applications`)
|
||||||
throw e
|
throw e
|
||||||
} finally {
|
} finally {
|
||||||
await execPromise('hdiutil detach "/Volumes/mihomo-party"')
|
await execPromise('hdiutil detach "/Volumes/mihomo-party"')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user