From f9d508196287d27ee75922763d57a9a5480a12d5 Mon Sep 17 00:00:00 2001 From: Andrew Griffiths Date: Tue, 6 Feb 2018 21:48:06 +1100 Subject: [PATCH] Reorder lookup to avoid building name map when not needed. --- mas-cli/Commands/Upgrade.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mas-cli/Commands/Upgrade.swift b/mas-cli/Commands/Upgrade.swift index 770de95..7c3693d 100644 --- a/mas-cli/Commands/Upgrade.swift +++ b/mas-cli/Commands/Upgrade.swift @@ -24,10 +24,10 @@ struct UpgradeCommand: CommandProtocol { let appIds: [UInt64] appIds = apps.flatMap { - if let appId = softwareMap.appIdWithProductName($0) { + if let appId = UInt64($0) { return appId } - if let appId = UInt64($0) { + if let appId = softwareMap.appIdWithProductName($0) { return appId } return nil