🐛 Disable account command on macOS 12

Documents #417.
This commit is contained in:
Chris Araman 2021-11-03 13:50:16 -07:00
parent 4660b4505b
commit c7a104a250
No known key found for this signature in database
GPG key ID: BB4499D9E11B61E0

View file

@ -18,6 +18,12 @@ public struct AccountCommand: CommandProtocol {
/// Runs the command.
public func run(_: Options) -> Result<Void, MASError> {
if #available(macOS 12, *) {
// Account information is no longer available as of Monterey.
// https://github.com/mas-cli/mas/issues/417
return .failure(.notSupported)
}
if let account = ISStoreAccount.primaryAccount {
print(String(describing: account.identifier))
} else {