Skip to content
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

Error messages shown as solid red bars #465

Open
mmaitre314 opened this issue Sep 7, 2024 · 3 comments · May be fixed by #475
Open

Error messages shown as solid red bars #465

mmaitre314 opened this issue Sep 7, 2024 · 3 comments · May be fixed by #475

Comments

@mmaitre314
Copy link

Error messages are not readable, likely because they are printed as red text over a red background:

npx tfx-cli extension create --manifests does-not-exist.json

image

Disabling coloring with --no-color makes the error message appear:

npx tfx-cli extension create --manifests does-not-exist.json --no-color

image

@polatengin
Copy link
Collaborator

Hi @mmaitre314 ,

Can I kindly ask you to check your terminal settings? Do you have any theme, or formatting settings applied?

I try it on a few terminals, I couldn't repro the issue.

The error, and the message is thrown by the node itself when we try to read the file.

Node should be able to render the error message in correct formatting.

@mmaitre314
Copy link
Author

I am using the Windows command prompt which should be in plain-vanilla configuration. Looking at the code, in /app/lib/trace.ts it looks like console.error sets the foreground as red and colors.bgRed makes the background red, so this ends up being printed as red-over-red.

export function error(msg: any, ...replacements: printable[]): void {
	log("error: ", msg, colors.bgRed, replacements, console.error);
}

Quick test in the Node REPL:

image

@polatengin
Copy link
Collaborator

yes, I could repro the issue on my end, too 👍

@polatengin polatengin linked a pull request Sep 26, 2024 that will close this issue
@polatengin polatengin linked a pull request Sep 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants