Currently I'm using make-process
and it's stderr
argument which is a buffer.
After the process has exited I'd like to check if the buffer-length
is zero (no error output).
This doesn't work as I get an unhelpful Process *my-process* stderr finished
.
Is there a way to get the stderr output of a process without additional text?
(besides searching for the string literal and stripping it out which seems over-complicated).
To give some context, I want to treat any error output as an error for the command I'm calling, as the exit-code isn't always a reliable way of checking if an error occurred.
cl-letf
to overrideinternal-default-process-sentinel
can be used to remove the extra text (./test/lisp/net/tramp-tests.el
in emacs repo does this), although I'd rather not have to override internal functions if there is a cleaner way to resolve.