From a4edc6af50d07a107c9403de3f1cf8f5925c705b Mon Sep 17 00:00:00 2001 From: Nikolay Edigaryev Date: Tue, 11 Feb 2025 19:16:03 +0400 Subject: [PATCH] Make tart set --random-serial no-nop for Linux VMs (#1027) --- 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 d8a15fd..c438d86 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