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

Allow NO_COLOR env var to be overridden by deno.env workspace setting #1156

Open
ArmaanAS opened this issue Sep 3, 2024 · 0 comments
Open

Comments

@ArmaanAS
Copy link
Contributor

ArmaanAS commented Sep 3, 2024

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": {
    "NO_COLOR": "0"
  }
}

This has no effect. The output remains in plain white.

https://github.com/denoland/vscode_deno/blame/2c5964d14f44c3155da255fb7d5d63326c0761a8/client/src/commands.ts#L151

This is the line to be removed, unless there is a specific reason it must be disabled. Otherwise, move it up 6 lines, just before the Object.assign line so that is can be overridden by the deno.env setting, like

+ env["NO_COLOR"] = "1";
const denoEnv = config.get<Record<string, string>>("env");
if (denoEnv) {
  Object.assign(env, denoEnv);
}
if (config.get<boolean>("future")) {
  env["DENO_FUTURE"] = "1";
}
- env["NO_COLOR"] = "1";
env["DENO_V8_FLAGS"] = getV8Flags();

Or maybe add a deno.color boolean variable to the VSCode settings. Just please allow some way to enable color outputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant