You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Failed mkc/npm commands hide their output, even with --debug #15
When a command run through run_cmd fails, its stdout and stderr are stored in BuildError.output, but the exception message is only <command> failed (<code>) in <cwd>. Nothing logs .output, and neither redun's traceback nor main() prints it. Successful output isn't logged either, even with --debug.
As a result, a game's compile errors and any npm ci/npm run build failure can't be diagnosed from the tool's output.
Reproduction in an isolated MKCD2APP_HOME:
Install a fake mkc in the toolchain's js_tools/node_modules/.bin that prints main.ts(3,1): error TS2304: Cannot find name 'spritez'. UNIQUE_MARKER_123 to stderr and exits 1, and put a placeholder ---simulator.html in the target dir.
Run mkcd2app build on a path source config, then run it again with --debug.
Both exit 1 with BuildError: ['mkc', 'build', '-j'] failed (1) in .../g-binary-js-build. UNIQUE_MARKER_123 appears in neither stdout nor stderr.
Real-world case: with the real toolchain, mkcd2app target install 4.0.999 fails with only BuildError: ['mkc', 'build', '-j'] failed (1) in /tmp/tmp8a_mvs_t. That temporary directory has already been deleted, so there's nothing left to inspect.
The tests check exc.value.output (test_build_wiring.py, lines 199–201) but not what the user sees.
Related gaps in the same function: output isn't streamed, so a long npm ci shows no progress, and there's no timeout.
Expected behavior: a failed command's output (or at least its tail) is shown to the user, in the exception message or logged at error level, and the full output is available with --debug.
Found while reviewing PR #7, toolchain at ce12c48.
changed the title [-][P1] Failed mkc/npm commands hide their output, even with --debug[/-][+]Failed mkc/npm commands hide their output, even with --debug[/+]on Nov 4, 2026
frommkcd2app.utils.runimportrun_cmdfrompathlibimportPathc=Path.cwd()
run_cmd(["python", "-c", "print(\"😀\")"], c)
run_cmd(["python", "-c", "raise Exception"], c)
Activity
[-][P1] Failed mkc/npm commands hide their output, even with --debug[/-][+]Failed mkc/npm commands hide their output, even with --debug[/+]UnsignedArduino commentedon Nov 4, 2026
this and #18 repos with this:
Show the output of failed mkc and npm commands