From 30828b61f8d33eb3525f534cbb611e6d1cb59c39 Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Tue, 11 Feb 2025 15:53:43 +0100 Subject: [PATCH] Make tart set --random-serial no-nop for Linux VMs --- Sources/tart/Commands/Set.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Sources/tart/Commands/Set.swift b/Sources/tart/Commands/Set.swift index d8a15fd1..c438d862 100644 --- a/Sources/tart/Commands/Set.swift +++ b/Sources/tart/Commands/Set.swift @@ -73,8 +73,7 @@ struct Set: AsyncParsableCommand { } #if arch(arm64) - if randomSerial { - let oldPlatform = vmConfig.platform as! Darwin + if randomSerial, let oldPlatform = vmConfig.platform as? Darwin { vmConfig.platform = Darwin(ecid: VZMacMachineIdentifier(), hardwareModel: oldPlatform.hardwareModel) } #endif