🐛 Left justify app ID column to restore brew bundle compatibility

This commit is contained in:
Ben Chatelain 2020-08-22 20:43:21 -06:00
parent 6c346c1f17
commit 872f0e3faf

View file

@ -24,11 +24,11 @@ struct AppListFormatter {
var output: String = "" var output: String = ""
for product in products { for product in products {
let appId = product.itemIdentifier.intValue let appId = product.itemIdentifier
let appName = product.appNameOrBbundleIdentifier.padding(toLength: maxLength, withPad: " ", startingAt: 0) let appName = product.appNameOrBbundleIdentifier.padding(toLength: maxLength, withPad: " ", startingAt: 0)
let version = product.bundleVersion let version = product.bundleVersion
output += String(format: "%12d %@ (%@)\n", appId, appName, version) output += "\(appId) \(appName) (\(version))\n"
} }
return output.trimmingCharacters(in: .newlines) return output.trimmingCharacters(in: .newlines)