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

implement CLICOLOR_FORCE environment variable #12148

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mic92
Copy link
Member

@Mic92 Mic92 commented Jan 7, 2025

This allows to force colors but not disable other features such as the progress bar. This is for instance useful in CI environments.

Adapted from
https://git.lix.systems/lix-project/lix/commit/378ec5fb0611e314511a7afc806664205846fc2e and others.

Tested in https://buildbot.thalheim.io/#/builders/103/builds/1490

Motivation

Context


Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

This allows to force colors but not disable other features such as the
progress bar. This is for instance useful in CI environments.

Adapted from
https://git.lix.systems/lix-project/lix/commit/378ec5fb0611e314511a7afc806664205846fc2e
and others.
@Mic92
Copy link
Member Author

Mic92 commented Jan 7, 2025

cc @xokdvium

@Mic92 Mic92 marked this pull request as draft January 9, 2025 14:48
@Mic92
Copy link
Member Author

Mic92 commented Jan 9, 2025

This still spawns a progressbar

@Mic92
Copy link
Member Author

Mic92 commented Jan 9, 2025

Ah. Because of nix build -L .#colorful it will always enable the progressbar ...
It works with nix-build, however nix-build doesn't prefix package names, which is quite useful.

@Mic92 Mic92 marked this pull request as ready for review January 9, 2025 15:21
Comment on lines +74 to +77
// set x x No
// unset x set Yes
// unset x unset If attached to a terminal
// [we choose the "modern" approach of colour-by-default]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming the x means "any value"...? Could you just write that, please? 😆

It took me so long to understand the difference between "x" and "set" x)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-cli Relating to the "nix" command
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants