mirror of
https://github.com/ninxsoft/Mist.git
synced 2025-05-29 06:25:32 -04:00
Add conditional macOS beta support
This commit is contained in:
parent
4837dc37c7
commit
bdf4fa1e34
1 changed files with 13 additions and 0 deletions
|
@ -312,6 +312,19 @@ class TaskManager: ObservableObject {
|
|||
tasks += [
|
||||
MistTask(type: .create, description: "macOS Installer in Disk Image") {
|
||||
try await InstallerCreator.create(installer, mountPoint: mountPointURL, cacheDirectory: cacheDirectory)
|
||||
|
||||
guard let major: Substring = installer.version.split(separator: ".").first else {
|
||||
return
|
||||
}
|
||||
|
||||
let source: URL = mountPointURL.appendingPathComponent("Applications/Install macOS \(major) beta.app")
|
||||
let destination: URL = mountPointURL.appendingPathComponent("Applications/Install \(installer.name).app")
|
||||
|
||||
guard FileManager.default.fileExists(atPath: source.path) else {
|
||||
return
|
||||
}
|
||||
|
||||
try await FileMover.move(source, to: destination)
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue