.armaan.s.
.armaan.s.3mo ago

Enable VSCode Testing color output?

When using the Testing panel in VSCode, how can I enable color output in the Test Results terminal output? I've tried changing settings.json
// .vscode/settings.json
{
"deno.future": true,
"deno.env": {
"NO_COLOR": "0"
},
"deno.enablePaths": ["./backend"],
"deno.config": "./backend/deno.json"
}
// .vscode/settings.json
{
"deno.future": true,
"deno.env": {
"NO_COLOR": "0"
},
"deno.enablePaths": ["./backend"],
"deno.config": "./backend/deno.json"
}
but that hasn't worked. When I log the NO_COLOR env var in the test, it's "1" and the output is plain white. Is it a bug or am I missing something?
11 Replies
marvinh.
marvinh.3mo ago
That's odd. It sounds like something either in your vscode setup or in your terminal config is setting NO_COLOR. It's not something we set in Deno, but something that's provided by the environment Deno runs in. That's where I'd look first
.armaan.s.
.armaan.s.OP3mo ago
I've disabled all extensions except for Deno and WSL but it's still happening.
marvinh.
marvinh.3mo ago
Doubt that an extension in vscode is setting it. What's the value by default in your terminal for NO_COLOR ?
.armaan.s.
.armaan.s.OP3mo ago
In my bash terminal, echo $NO_COLOR is just blank.
marvinh.
marvinh.3mo ago
that's a good sign
.armaan.s.
.armaan.s.OP3mo ago
I think the Deno VSCode extension itself is setting NO_COLOR to "1", overriding my config. https://github.com/denoland/vscode_deno/blob/2c5964d14f44c3155da255fb7d5d63326c0761a8/client/src/commands.ts#L151
GitHub
vscode_deno/client/src/commands.ts at 2c5964d14f44c3155da255fb7d5d6...
Visual Studio Code plugin for Deno. Contribute to denoland/vscode_deno development by creating an account on GitHub.
No description
.armaan.s.
.armaan.s.OP3mo ago
I guess that's what's meant by this line in the tooltip.
No description
marvinh.
marvinh.3mo ago
oh
.armaan.s.
.armaan.s.OP3mo ago
What's my next step? Should I open a GitHub issue?
marvinh.
marvinh.3mo ago
yeah that's probably the best next step.
.armaan.s.
.armaan.s.OP3mo ago
https://github.com/denoland/vscode_deno/issues/1156 Thanks, I've created the issue in the vscode_deno repo.
GitHub
Allow NO_COLOR env var to be overridden by deno.env workspace s...
I would like the VSCode Test Results output to be in color. I'm not able to override the NO_COLOR environment variable in settings.json, like // .vscode/settings.json { "deno.env": { ...