We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee55f0b commit ca71645Copy full SHA for ca71645
Sources/Swiftly/Swiftly.swift
@@ -108,10 +108,15 @@ extension SwiftlyCommand {
108
// Verify that the configuration exists and can be loaded
109
_ = try await Config.load(ctx)
110
111
+ let shouldUpdateSwiftly: Bool
112
+ if let swiftlyRelease = try? await ctx.httpClient.getCurrentSwiftlyRelease() {
113
+ shouldUpdateSwiftly = try swiftlyRelease.swiftlyVersion > SwiftlyCore.version
114
+ } else {
115
+ shouldUpdateSwiftly = false
116
+ }
117
+
118
return {
- if let swiftlyRelease = try? await ctx.httpClient.getCurrentSwiftlyRelease(),
- swiftlyRelease.swiftlyVersion > SwiftlyCore.version
- {
119
+ if shouldUpdateSwiftly {
120
let updateMessage = """
121
-----------------------------
122
A new release of swiftly is available.
0 commit comments