Skip to content

AsyncParsableCommand exits before running run() async #538

@julianiaccopucci

Description

@julianiaccopucci

When using an AsyncParsableCommand with @main, the command-line-tool exits without running the run() async function and prints the help log.
Note: run() without async runs the function.

ArgumentParser version: 1.2.0
Swift version: swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
MacOS 12.6

Checklist

  • If possible, I've reproduced the issue using the main branch of this package
  • I've searched for existing GitHub issues

Steps to Reproduce

Option A: Reproduce by running the Example in this repository

Option B:
Screenshot 2023-01-06 at 10 36 30

Expected behavior

The run() async function should run

Actual behavior

The run() async function isn't run and the program exits with the help log.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions