shell: add string fields for debugging

This commit is contained in:
Girish Ramakrishnan
2025-12-12 11:59:41 +01:00
parent 2029148e7c
commit b89aa4488c
+2
View File
@@ -81,8 +81,10 @@ function spawn(tag, file, args, options) {
const e = new BoxError(BoxError.SHELL_ERROR, `${file} exited with code ${code} signal ${signal}`);
e.stdout = stdout; // when promisified, this is the way to get stdout
e.stdoutString = options.encoding ? stdout : stdout.toString(); // make error printable
e.stdoutLineCount = stdoutLineCount;
e.stderr = stderr; // when promisified, this is the way to get stderr
e.stderrString = options.encoding ? stderr : stderr.toString(); // make error printable
e.stderrLineCount = stderrLineCount;
e.code = code;
e.signal = signal;