Include a portion of process output in a failed `process.expect()`
When you use exec().expect() and it fails, usually the most helpful thing is to see stdout to see what the program itself thought about why it was failing. However, all you get are the exit code and the environment in the error message, and not any output. As a result it can be difficult to diagnose.
see https://github.com/thefrontside/effection/blob/v2/packages/process/src/exec/posix.ts#L26-L30
As a workaround, use process.join() instead and manually generate the error message from stdout
@cowboyd so we do need to add stderr to error that's omitted? What about stdout? Also, the link doesn't work
I think so, yes… maybe the last 25 lines of each?
This is a wont fix since v3 core does not have a process api, and we may need to ship a separate one for Deno, Bun, Node