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