Skip to content

Make run and throwable #96

Open
Open
@Blackjacx

Description

@Blackjacx

I already mentioned this request in #92. I think it is a very common use case to make all run commands throwable.

What I would like to avoid is the extra check for the error and manually print the error like this:

        let out = run("mint", args)

        if let error = out.error {
            print(out.stderror)
            throw error
        }

The following would be much cleaner imho and the failure reason could be part of the error or an underlying error maybe:

        let successfulOut = try run("mint", args)

Originally posted by @stherold in #92 (comment)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions