2
0
Fork 0
mirror of https://github.com/mas-cli/mas synced 2025-02-22 23:48:33 +00:00

⌨️ Fix typo

This commit is contained in:
Chris Araman 2021-04-27 15:33:49 -07:00
parent 0a506b1ebe
commit 2cf5ce3013
No known key found for this signature in database
GPG key ID: BB4499D9E11B61E0
2 changed files with 3 additions and 3 deletions
Sources/MasKit

View file

@ -19,14 +19,14 @@ struct AppListFormatter {
/// - Returns: Multiliune text outoutp.
static func format(products: [SoftwareProduct]) -> String {
// find longest appName for formatting, default 50
let maxLength = products.map(\.appNameOrBbundleIdentifier.count).max() ?? nameColumnMinWidth
let maxLength = products.map(\.appNameOrBundleIdentifier.count).max() ?? nameColumnMinWidth
var output: String = ""
for product in products {
let appId = product.itemIdentifier.stringValue
.padding(toLength: idColumnMinWidth, withPad: " ", startingAt: 0)
let appName = product.appNameOrBbundleIdentifier.padding(toLength: maxLength, withPad: " ", startingAt: 0)
let appName = product.appNameOrBundleIdentifier.padding(toLength: maxLength, withPad: " ", startingAt: 0)
let version = product.bundleVersion
output += "\(appId) \(appName) (\(version))\n"

View file

@ -29,7 +29,7 @@ extension SoftwareProduct {
}
/// Returns bundleIdentifier if appName is empty string.
var appNameOrBbundleIdentifier: String {
var appNameOrBundleIdentifier: String {
appName == "" ? bundleIdentifier : appName
}