From e8a6e9c4cf00823ab9fff32dac1ddd408d0501f8 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Thu, 17 Jul 2025 16:39:39 -0400 Subject: [PATCH 1/2] Remove swiftly update message from swiftly run command --- Sources/Swiftly/Run.swift | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Sources/Swiftly/Run.swift b/Sources/Swiftly/Run.swift index a3126b4e..21c1bb2c 100644 --- a/Sources/Swiftly/Run.swift +++ b/Sources/Swiftly/Run.swift @@ -58,10 +58,8 @@ struct Run: SwiftlyCommand { } mutating func run(_ ctx: SwiftlyCoreContext) async throws { - let versionUpdateReminder = try await validateSwiftly(ctx) - defer { - versionUpdateReminder() - } + try await validateSwiftly(ctx) + var config = try await Config.load(ctx) // Handle the specific case where help is requested of the run subcommand From 0c3b9882f4083ede7a1306de7c867364125faf30 Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Fri, 18 Jul 2025 07:09:49 -0400 Subject: [PATCH 2/2] Make validateSwiftly result discardable --- Sources/Swiftly/SelfUpdate.swift | 2 +- Sources/Swiftly/Swiftly.swift | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Swiftly/SelfUpdate.swift b/Sources/Swiftly/SelfUpdate.swift index eb26b14e..fb3d93bc 100644 --- a/Sources/Swiftly/SelfUpdate.swift +++ b/Sources/Swiftly/SelfUpdate.swift @@ -29,7 +29,7 @@ struct SelfUpdate: SwiftlyCommand { } mutating func run(_ ctx: SwiftlyCoreContext) async throws { - let _ = try await validateSwiftly(ctx) + try await validateSwiftly(ctx) let swiftlyBin = Swiftly.currentPlatform.swiftlyBinDir(ctx) / "swiftly" guard try await fs.exists(atPath: swiftlyBin) else { diff --git a/Sources/Swiftly/Swiftly.swift b/Sources/Swiftly/Swiftly.swift index 6660b9ab..31f6d59a 100644 --- a/Sources/Swiftly/Swiftly.swift +++ b/Sources/Swiftly/Swiftly.swift @@ -95,6 +95,7 @@ extension Data { } extension SwiftlyCommand { + @discardableResult public mutating func validateSwiftly(_ ctx: SwiftlyCoreContext) async throws -> () -> Void { for requiredDir in Swiftly.requiredDirectories(ctx) { guard try await fs.exists(atPath: requiredDir) else {