mirror of
https://github.com/utmapp/UTM.git
synced 2026-10-12 02:24:01 +00:00
config(apple): create generic platform if it does not exist
This commit is contained in:
@@ -67,6 +67,10 @@ struct UTMAppleConfigurationSystem: Codable {
|
||||
boot = try values.decode(UTMAppleConfigurationBoot.self, forKey: .boot)
|
||||
macPlatform = try values.decodeIfPresent(UTMAppleConfigurationMacPlatform.self, forKey: .macPlatform)
|
||||
genericPlatform = try values.decodeIfPresent(UTMAppleConfigurationGenericPlatform.self, forKey: .genericPlatform)
|
||||
if boot.operatingSystem == .linux && genericPlatform == nil {
|
||||
// fix a bug where this was not created
|
||||
genericPlatform = UTMAppleConfigurationGenericPlatform()
|
||||
}
|
||||
}
|
||||
|
||||
func encode(to encoder: Encoder) throws {
|
||||
|
||||
Reference in New Issue
Block a user