Basic issue is that you might get something stderr which is irrelevant to command run and thus want to display to user to allow debugging. I suspect there might be other places where this type of generic error would be useful but haven't looked.
Let me know if you want me to change anything or thought of a better way to implement this?
Fixes this issue https://github.com/amoussard/sftp-deployment/issues/94
Basic issue is that you might get something stderr which is irrelevant to command run and thus want to display to user to allow debugging. I suspect there might be other places where this type of generic error would be useful but haven't looked.
Let me know if you want me to change anything or thought of a better way to implement this?