From 662dfb9cf0d788c4931ef9f536e452bcc1f60ae8 Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Wed, 20 Nov 2024 10:41:42 -0800 Subject: [PATCH] config(apple): create generic platform if it does not exist --- Configuration/UTMAppleConfigurationSystem.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Configuration/UTMAppleConfigurationSystem.swift b/Configuration/UTMAppleConfigurationSystem.swift index a1f508162..c16a01294 100644 --- a/Configuration/UTMAppleConfigurationSystem.swift +++ b/Configuration/UTMAppleConfigurationSystem.swift @@ -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 {