@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.
@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 ofstderr. That way, the consumer does not have to look forstderrspecifically but they can use acatchblock instead and get a single string instdoutinstead 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.