You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using the following overload for command in order to be able to return a Promise from PromiseKit directly from my command. This, I think, makes it very easy to write asynchronous CLI apps (e.g. performing multiple tasks in parallel).
This example is only for the very specific "two argument descriptor and an executor" overload, but could easily be written for every already existing overload.
How would you feel about a pull request that would add these overloads? (probably as a new target, so that it's opt-in for consumers)
I would also like to improve the error handling (command({ throw err }).run()), how would you feel about extracting out the following lines to a separate function?
Hey 👋
I'm currently using the following overload for
command
in order to be able to return aPromise
from PromiseKit directly from my command. This, I think, makes it very easy to write asynchronous CLI apps (e.g. performing multiple tasks in parallel).This example is only for the very specific "two argument descriptor and an executor" overload, but could easily be written for every already existing overload.
How would you feel about a pull request that would add these overloads? (probably as a new target, so that it's opt-in for consumers)
I would also like to improve the error handling (
command({ throw err }).run()
), how would you feel about extracting out the following lines to a separate function?Commander/Sources/Commander/CommandRunner.swift
Lines 25 to 46 in 314f8d7
Thanks for a great library 🍻
The text was updated successfully, but these errors were encountered: