Skip to content

Commit 02739f9

Browse files
authored
Remove swiftly update message from swiftly run command (#401)
* Remove swiftly update message from swiftly run command * Make validateSwiftly result discardable
1 parent 7772f32 commit 02739f9

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Sources/Swiftly/Run.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ struct Run: SwiftlyCommand {
5858
}
5959

6060
mutating func run(_ ctx: SwiftlyCoreContext) async throws {
61-
let versionUpdateReminder = try await validateSwiftly(ctx)
62-
defer {
63-
versionUpdateReminder()
64-
}
61+
try await validateSwiftly(ctx)
62+
6563
var config = try await Config.load(ctx)
6664

6765
// Handle the specific case where help is requested of the run subcommand

Sources/Swiftly/SelfUpdate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct SelfUpdate: SwiftlyCommand {
2929
}
3030

3131
mutating func run(_ ctx: SwiftlyCoreContext) async throws {
32-
let _ = try await validateSwiftly(ctx)
32+
try await validateSwiftly(ctx)
3333

3434
let swiftlyBin = Swiftly.currentPlatform.swiftlyBinDir(ctx) / "swiftly"
3535
guard try await fs.exists(atPath: swiftlyBin) else {

Sources/Swiftly/Swiftly.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ extension Data {
9595
}
9696

9797
extension SwiftlyCommand {
98+
@discardableResult
9899
public mutating func validateSwiftly(_ ctx: SwiftlyCoreContext) async throws -> () -> Void {
99100
for requiredDir in Swiftly.requiredDirectories(ctx) {
100101
guard try await fs.exists(atPath: requiredDir) else {

0 commit comments

Comments
 (0)