mirror of
https://github.com/mas-cli/mas
synced 2025-02-22 23:48:33 +00:00
⌨️ Fix typo
This commit is contained in:
parent
0a506b1ebe
commit
2cf5ce3013
2 changed files with 3 additions and 3 deletions
Sources/MasKit
|
@ -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"
|
||||
|
|
|
@ -29,7 +29,7 @@ extension SoftwareProduct {
|
|||
}
|
||||
|
||||
/// Returns bundleIdentifier if appName is empty string.
|
||||
var appNameOrBbundleIdentifier: String {
|
||||
var appNameOrBundleIdentifier: String {
|
||||
appName == "" ? bundleIdentifier : appName
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue