Skip to content

Commit

Permalink
πŸ› Disable purchase command on macOS 10.15
Browse files Browse the repository at this point in the history
Documents #289.
  • Loading branch information
chris-araman committed Nov 3, 2021
1 parent c8358ae commit 0ac99aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Sources/MasKit/Commands/Purchase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ public struct PurchaseCommand: CommandProtocol {

/// Runs the command.
public func run(_ options: Options) -> Result<Void, MASError> {
if #available(macOS 10.15, *) {
// Purchases are no longer possible as of Catalina.
// https://github.com/mas-cli/mas/issues/289
return .failure(.notSupported)
}

// Try to download applications with given identifiers and collect results
let appIds = options.appIds.filter { appId in
if let product = appLibrary.installedApp(forId: appId) {
Expand Down

0 comments on commit 0ac99aa

Please sign in to comment.