mirror of
https://github.com/mas-cli/mas
synced 2024-11-21 19:23:01 +00:00
Re-enable purchase
.
`purchase` seems to work on macOS 12+. Resolve #289 Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
This commit is contained in:
parent
622a154fb9
commit
5676dcb797
2 changed files with 1 additions and 11 deletions
|
@ -29,12 +29,6 @@ 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) {
|
||||
|
|
|
@ -20,11 +20,7 @@ public class PurchaseCommandSpec: QuickSpec {
|
|||
it("purchases apps") {
|
||||
let cmd = PurchaseCommand()
|
||||
let result = cmd.run(PurchaseCommand.Options(appIds: []))
|
||||
expect(result)
|
||||
.to(
|
||||
beFailure { error in
|
||||
expect(error) == .notSupported
|
||||
})
|
||||
expect(result).to(beSuccess())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue