Skip to content

Commit 662dfb9

Browse files
committed
config(apple): create generic platform if it does not exist
1 parent 8a24291 commit 662dfb9

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Configuration/UTMAppleConfigurationSystem.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ struct UTMAppleConfigurationSystem: Codable {
6767
boot = try values.decode(UTMAppleConfigurationBoot.self, forKey: .boot)
6868
macPlatform = try values.decodeIfPresent(UTMAppleConfigurationMacPlatform.self, forKey: .macPlatform)
6969
genericPlatform = try values.decodeIfPresent(UTMAppleConfigurationGenericPlatform.self, forKey: .genericPlatform)
70+
if boot.operatingSystem == .linux && genericPlatform == nil {
71+
// fix a bug where this was not created
72+
genericPlatform = UTMAppleConfigurationGenericPlatform()
73+
}
7074
}
7175

7276
func encode(to encoder: Encoder) throws {

0 commit comments

Comments
 (0)