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
It doesn't seem like async entry points work when using swift sh, at least at first glance. I initially noticed this when migrating from ParsableCommand to AsyncParsableCommand, and all of a sudden my command only printed usage information, but never ran. Unfortunately, adding an await to the entry point await YourCommand.main() doesn't work (non-asyncmain() is preferred), though the likely proper solution is to implement something like in #163, but make sure async entry points are supported.
For those that land here, there is a workaround:
let group = DispatchGroup()
group.enter()
Task {
await YourCommand.main()
group.leave()
}
group.wait()
The text was updated successfully, but these errors were encountered:
It doesn't seem like async entry points work when using
swift sh
, at least at first glance. I initially noticed this when migrating fromParsableCommand
toAsyncParsableCommand
, and all of a sudden my command only printed usage information, but never ran. Unfortunately, adding anawait
to the entry pointawait YourCommand.main()
doesn't work (non-async
main()
is preferred), though the likely proper solution is to implement something like in #163, but make sure async entry points are supported.For those that land here, there is a workaround:
The text was updated successfully, but these errors were encountered: