File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public final class CommandRegistry<ClientError: Error> {
9898 /// arguments.
9999 ///
100100 /// Returns the results of the execution, or nil if no such command exists.
101- public func runCommand ( _ verb: String , arguments: [ String ] ) -> Result < ( ) , CommandantError < ClientError > > ? {
101+ public func run ( command verb: String , arguments: [ String ] ) -> Result < ( ) , CommandantError < ClientError > > ? {
102102 return self [ verb] ? . run ( ArgumentParser ( arguments) )
103103 }
104104
@@ -162,7 +162,7 @@ extension CommandRegistry {
162162 arguments. remove ( at: 0 )
163163 }
164164
165- switch runCommand ( verb, arguments: arguments) {
165+ switch run ( command : verb, arguments: arguments) {
166166 case . success? :
167167 exit ( EXIT_SUCCESS)
168168
@@ -216,3 +216,10 @@ extension CommandRegistry {
216216// MARK: - migration support
217217@available ( * , unavailable, renamed: " CommandProtocol " )
218218public typealias CommandType = CommandProtocol
219+
220+ extension CommandRegistry {
221+ @available ( * , unavailable, renamed: " run(command:arguments:) " )
222+ public func runCommand( _ verb: String , arguments: [ String ] ) -> Result < ( ) , CommandantError < ClientError > > ? {
223+ return run ( command: verb, arguments: arguments)
224+ }
225+ }
You can’t perform that action at this time.
0 commit comments