Skip to content

Commit 0c3b988

Browse files
committed
Make validateSwiftly result discardable
1 parent e8a6e9c commit 0c3b988

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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)