🔊 Log errors using printError

This commit is contained in:
Ben Chatelain 2021-04-28 23:04:53 -06:00
parent 4cba212570
commit 62a09bdbb7
3 changed files with 3 additions and 3 deletions

View file

@ -27,7 +27,7 @@ public struct AccountCommand: CommandProtocol {
if let account = ISStoreAccount.primaryAccount {
print(String(describing: account.identifier))
} else {
print("Not signed in")
printError("Not signed in")
return .failure(.notSignedIn)
}
return .success(())

View file

@ -32,7 +32,7 @@ public struct ListCommand: CommandProtocol {
public func run(_: Options) -> Result<Void, MASError> {
let products = appLibrary.installedApps
if products.isEmpty {
print("No installed apps found")
printError("No installed apps found")
return .success(())
}

View file

@ -47,7 +47,7 @@ public struct LuckyCommand: CommandProtocol {
do {
let results = try storeSearch.search(for: options.appName).wait()
guard let result = results.first else {
print("No results found")
printError("No results found")
return .failure(.noSearchResultsFound)
}