New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typedoc is writing 1 byte to STDERR when successful, causing other tools to raise flags #1566
Comments
This is a weird one... and one I can't seem to reproduce. The only log statements in typedoc are in the bin file, and the ConsoleLogger. The ConsoleLogger always writes to stdout, since that's what TS does, and there are only 5 logs in the bin folder, 2 of which write to stderr... and that will only happen if there is an uncaught exception. Lines 29 to 30 in 2103f34
typedoc/src/lib/utils/loggers.ts Line 206 in 00ae3c7
If you could set up a project that I could install that repros this issue, that would be great. My local test project doesn't seem to have this issue. |
Here's a pretty small repro: typedoc-repro.zip After you unzip, run these commands from the root:
And you'll see the one byte coming from STDERR. |
So... turns out this isn't in TypeDoc. It's in the I think you win for the weirdest bug I've fixed this year so far... |
Lol excellent. 😄 Glad you were able to track it down! Weird indeed. |
Expected Behavior
typedoc should not be writing anything to STDERR if it was successful.
Actual Behavior
typedoc writes a single byte (a newline, I think) to STDERR on success. This is problematic because other tools (like Rush.js, for instance, which I'm using) interpret STDERR content to mean that something failed. When I run typedoc through Rush, I get messages like this:
Steps to reproduce the bug
You can see here pretty clearly that there's one byte of content in STDERR, even though the build was successful:
(I tested this same sequence of commands with a non-typedoc tool and the STDERR file was 0 bytes, as expected.)
Environment
The text was updated successfully, but these errors were encountered: