Skip to content

Commit eace181

Browse files
committed
address feedback
1 parent 863889f commit eace181

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/Commands/SwiftPackageCollectionsTool.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ struct ProfileOptions: ParsableArguments {
4343
@Option(name: .long, help: "Profile to use for the given command")
4444
var profile: String?
4545

46-
var usedProfile: PackageCollectionsModel.Profile {
46+
var usedProfile: PackageCollectionsModel.Profile? {
4747
if let profile = profile {
4848
return .init(name: profile)
4949
} else {
50-
return .default
50+
return nil
5151
}
5252
}
5353
}
@@ -287,8 +287,8 @@ public struct SwiftPackageCollectionsTool: ParsableCommand {
287287
}
288288

289289
let modules = version.targets.compactMap { $0.moduleName }.joined(separator: ", ")
290-
let platforms = optionalRow("Supported Platforms", version.verifiedPlatforms?.map { $0.name }.joined(separator: ", "))
291-
let swiftVersions = optionalRow("Supported Swift Versions", version.verifiedSwiftVersions?.map { $0.rawValue }.joined(separator: ", "))
290+
let platforms = optionalRow("Verified Platforms", version.verifiedPlatforms?.map { $0.name }.joined(separator: ", "))
291+
let swiftVersions = optionalRow("Verified Swift Versions", version.verifiedSwiftVersions?.map { $0.rawValue }.joined(separator: ", "))
292292
let license = optionalRow("License", version.license?.type.description)
293293
let cves = optionalRow("CVEs", version.cves?.map { $0.identifier }.joined(separator: ", "))
294294

@@ -341,8 +341,8 @@ private func optionalRow(_ title: String, _ contents: String?) -> String {
341341

342342
private extension JSONEncoder {
343343
func print<T>(_ value: T) throws where T : Encodable {
344-
if #available(macOS 10.13, *) {
345-
self.outputFormatting = [.prettyPrinted, .sortedKeys]
344+
if #available(macOS 10.15, *) {
345+
self.outputFormatting = [.prettyPrinted, .sortedKeys, .withoutEscapingSlashes]
346346
}
347347

348348
let jsonData = try self.encode(value)

0 commit comments

Comments
 (0)