Disabling colors for `nix log` output

Is there a way to disable ANSI color codes in the output you get when using nix log?

this came up on nixos discord , I couldn’t find any arg that disables colour output.

User: zeroin said that they worked around it by using GitHub - andre-simon/ansifilter: ANSI sequence filter

Exporting the NO_COLOR environment variable should do it.

1 Like

Just tried it out. It should have an affect on some command apparently but nix log remains coloured for me.

I created a PR to address this. Make `nix log` respect NO_COLOR=1 by knedlsepp · Pull Request #6911 · NixOS/nix · GitHub

1 Like