Add reverted code path for pre 5.9

This commit is contained in:
STREGA 2023-09-30 08:01:23 -04:00
parent 5969630c48
commit a3ffd95019
1 changed files with 6 additions and 0 deletions

View File

@ -29,11 +29,17 @@ extension Sequence {
}
/// A type that can be executed as part of a nested tree of commands.
#if swift(<5.9)
public protocol AsyncParsableCommand: ParsableCommand {
mutating func run() async throws
}
#else
extension AsyncParsableCommand {
public mutating func run() throws {
throw CleanExit.helpRequest(self)
}
}
#endif
public protocol AsyncMain {
associatedtype Command: ParsableCommand