Skip to content

Commit 248636a

Browse files
authored
Fix pluralization of 'package-collection refresh' text (#3542)
An exceedingly minor grammar fix: conditionally pluralize the `package-collection refresh` response based on the number of collections that were refreshed. ### Motivation: Use correct grammar in user-facing messages. ### Modifications: Changed the output of `package-collection refresh` to say "Refreshed _n_ configured package collection[s]." instead of always pluralizing "collections". ### Result: If only one collection is refreshed, the output of this command will now say "collection" instead of "collections".
1 parent 05c313e commit 248636a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Commands/SwiftPackageCollectionsTool.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ public struct SwiftPackageCollectionsTool: ParsableCommand {
100100
let collections = try with { collections in
101101
try tsc_await { collections.refreshCollections(callback: $0) }
102102
}
103-
print("Refreshed \(collections.count) configured package collections.")
103+
print("Refreshed \(collections.count) configured package collection\(collections.count == 1 ? "" : "s").")
104104
}
105105
}
106106

0 commit comments

Comments
 (0)