Skip to content

How to get rejected promise instead of output.stderr #98

@GaikwadPratik

Description

@GaikwadPratik

@jedwards1211 ,

This is more like a question/suggestion than issue.

Currently, the library returns an object with {stderr: string| undefined, stdout: string|undefined}. I think it would make more sense, since it is promise based, if it returns a rejected promise instead of stderr. That way, the consumer does not have to look for stderr specifically but they can use a catch block instead and get a single string in stdout instead of object. I think that would simplify a lot of code and would improve readability.

So question is, was there there any specific reason it is not implemented? Can this be taken under consideration and implemented?

Also this section says, it will return rejected promise in case of error which I think is misleading/confusing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions