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
I would have expected to see the same output as when I launch bun tsc from my shell, with pretty colors:
src/browser/index.ts:39:25 - error TS2345: Argument of type ...
Found 7 errors in 4 files.
Errors Files
2 src/browser/index.ts:39
3 src/bun/build.ts:3
1 src/common/string2long.test.ts:1
1 tsconfig.json:41
error: "tsc" exited with code 1
PS: I cannot (easily) provide/show you the colors here, but you'll know what I mean.
What do you see instead?
I'm seeing this instead, without (!) the colors, and with what too many as an end-user looks like a too internal technical stdout: Buffer and stderr: Buffer:
I do perfectly understand why this is technically happening (the exec-ed tool cannot detect whether the "Bun terminal"; whatever tsc uses, whether something like https://github.com/chalk/supports-color for https://no-color.org/ and https://force-color.org/ or its own algorithm; but this of course isn't specific to tsc but more generic), etc.
In a "perfect world", it would be very cool if this "just worked", out of the box.
The text was updated successfully, but these errors were encountered:
vorburger
changed the title
Shell ($) should pass-through ANSI Color, and not print "ugly" stdout: Buffer(1415) [ 115, 114, ...
TSC from Shell ($) should pass-through ANSI Color, and not print "ugly" stdout: Buffer(1415) [ 115, 114, ...
Jan 19, 2025
FTR: This appears to be specific to tsc?! Or at least it, and maybe other tools, depending on how they detect their terminal - but I've just noticed that what I describe above does not seem to affect e.g. an "await $`bun test`"... that works just fine - with colors, and without the Buffer thing.
BTW: A ("naive") attempt of using "await $`FORCE_COLORS=1 && echo $FORCE_COLORS && bun tsc`" does not fix it.
What version of Bun is running?
1.1.45+196621f25
What platform is your computer?
Linux 6.10.11
What steps can reproduce the bug?
What is the expected behavior?
I would have expected to see the same output as when I launch
bun tsc
from my shell, with pretty colors:PS: I cannot (easily) provide/show you the colors here, but you'll know what I mean.
What do you see instead?
I'm seeing this instead, without (!) the colors, and with what too many as an end-user looks like a too internal technical
stdout: Buffer
andstderr: Buffer
:Additional information
I do perfectly understand why this is technically happening (the
exec
-ed tool cannot detect whether the "Bun terminal"; whatevertsc
uses, whether something like https://github.com/chalk/supports-color for https://no-color.org/ and https://force-color.org/ or its own algorithm; but this of course isn't specific totsc
but more generic), etc.In a "perfect world", it would be very cool if this "just worked", out of the box.
The text was updated successfully, but these errors were encountered: