Skip to content

Commit

Permalink
config(apple): create generic platform if it does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Nov 20, 2024
1 parent 8a24291 commit 662dfb9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Configuration/UTMAppleConfigurationSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 662dfb9

Please sign in to comment.