question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE]: Ability to disable colorised output

See original GitHub issue

Feature Request

Background / Motivation

Currently there doesn’t appear to be a way to disable colourised output besides using a JSON/YAML output format. This can cause issues with terminals that don’t fully support colourisation or font change e.g. italics. An example below

image

Admittedly the funny looking font is my terminal configuration (Default Windows Terminal with Cascadia Code Italics) but I cannot disable this “feature” in garden

It also causes issues in CI logging tools and spews out ANSI codes in log output.

What should the user be able to do?

There already exists a --log-level command line argument. I would like a --no-color argument as well to disable any fancy colouristation of output. Or perhaps an additional log-level of no-color which behave like basic but also have no colour.

This would also disable the ability to move the cursor easily using ANSI sequences so I’d expect this is an opt in setting.

Why do they want to do this? What problem does it solve?

If my terminal renders the “fancy” text incorrectly, I can quickly disable it so I can read the output of Garden

Suggested Implementation(s)

As above. either add --no-color or --log-level no-color

How important is this feature for you/your team?

🌵 Not having this feature makes using Garden painful

The rendered text is more difficult to read with a default install of Windows Terminal

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
edvaldcommented, Jun 1, 2021

There is actually an undocumented way to do this with an environment variable: FORCE_COLOR=0. But the feature request is still definitely legit, we should have a canonical + documented way to do this.

0reactions
stale[bot]commented, Jul 31, 2022

This issue has been automatically marked as stale because it hasn’t had any activity in 90 days. It will be closed in 14 days if no further activity occurs (e.g. changing labels, comments, commits, etc.). Please feel free to tag a maintainer and ask them to remove the label if you think it doesn’t apply. Thank you for submitting this issue and helping make Garden a better product!

Read more comments on GitHub >

github_iconTop Results From Across the Web

CLI switch to disable color output - returntocorp/semgrep
I propose a switch to disable this color output. The switch --no-force-color does not disable color output, it just disables forcing the color....
Read more >
NO_COLOR: disabling ANSI color output in various Unix ...
Software Description Date/Version Supported alogview Android logcat Filter 2018‑10‑31 Ammonite Scala Scripting 2017‑07‑03 / 1.0.0 Ansible IT automation system 2021‑04‑26 / 2.11.0
Read more >
Kubuntu: how to disable color in output of 'watch' command
(a) I was able to discern which ESC sequences are for cursor movement and which are for color. That for cursor movement eI...
Read more >
NO_COLOR: output with ANSI colour by default, good or ...
Having or not having colored output should be controlled by the presence/absence of the corresponding features in the termcap/terminfo entry of ...
Read more >
Disabling git colors only when I log in from certain terminals
Variant 1: a shell function in your ~/.bashrc : if [ `tput colors` -lt 2 ]; then git() {command git -c color.ui=never "$@";...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found