go-shell icon indicating copy to clipboard operation
go-shell copied to clipboard

Error() does not return message

Open liujin1993 opened this issue 7 years ago • 2 comments

image image

a.sh is not exits, but process.Error() only return [127] and a blank line. I hope that it returns “no such file”

liujin1993 avatar Dec 11 '18 15:12 liujin1993

It should be "return fmt.Errorf("[%v] %s\n", p.ExitStatus, errlines[:s])" in Error() not "return fmt.Errorf("[%v] %s\n", p.ExitStatus, errlines[s])"

liujin1993 avatar Dec 12 '18 11:12 liujin1993

A PR would taken for this!

On Wed, Dec 12, 2018 at 5:02 AM liujin1993 [email protected] wrote:

It should be "return fmt.Errorf("[%v] %s\n", p.ExitStatus, errlines[:s])" in Error() not "return fmt.Errorf("[%v] %s\n", p.ExitStatus, errlines[s])"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/progrium/go-shell/issues/5#issuecomment-446548299, or mute the thread https://github.com/notifications/unsubscribe-auth/AAACh73vz5TfS_CYnbyjAXsMzxNJKz4tks5u4OJSgaJpZM4ZNpK0 .

-- Jeff Lindsay http://progrium.com

progrium avatar Dec 12 '18 17:12 progrium