Title: Empty values of FORCE_COLOR and NO_COLOR are not ignored · Issue #129061 · python/cpython · GitHub
Open Graph Title: Empty values of FORCE_COLOR and NO_COLOR are not ignored · Issue #129061 · python/cpython
X Title: Empty values of FORCE_COLOR and NO_COLOR are not ignored · Issue #129061 · python/cpython
Description: Bug report Bug description: https://no-color.org/ Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an empty string (regardless of its value),...
Open Graph Description: Bug report Bug description: https://no-color.org/ Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an...
X Description: Bug report Bug description: https://no-color.org/ Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an...
Opengraph URL: https://github.com/python/cpython/issues/129061
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Empty values of FORCE_COLOR and NO_COLOR are not ignored","articleBody":"# Bug report\n\n### Bug description:\n\nhttps://no-color.org/\n\n\u003e Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present **and not an empty string** (regardless of its value), prevents the addition of ANSI color.\n\nhttps://force-color.org/\n\n\u003e Command-line software which outputs colored text should check for a FORCE_COLOR environment variable. When this variable is present and **not an empty string** (regardless of its value), it should force the addition of ANSI color.\n\nBoth \"standards\" state that these environment variables has only effect if their value is not an empty string. But Python currently only tests that the environment variables are defined.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-129140\n* gh-129360\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2025-01-20T12:28:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/129061/cpython/issues/129061"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bb547098-397b-b9a7-ae81-883b7cee9881 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C5B2:322E35:29E5151:3A4D176:6A4F5BC2 |
| html-safe-nonce | 40f3784de14d3a5f8614a95c7676d5bf5a67d7a0d8d010b6da72d2ab219f10bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUIyOjMyMkUzNToyOUU1MTUxOjNBNEQxNzY6NkE0RjVCQzIiLCJ2aXNpdG9yX2lkIjoiMzE5NDE1NTE3MTA5MDIyNjExNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 94d91676f1607f1b47aaa52339c0c12f6ce0326d86bb7f1acdcdb570f69686c1 |
| hovercard-subject-tag | issue:2799138835 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/129061/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1110bac2f08012b1436223b09a5ee573016130c618848b58f50d5319d7b6d138/python/cpython/issues/129061 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1110bac2f08012b1436223b09a5ee573016130c618848b58f50d5319d7b6d138/python/cpython/issues/129061 |
| og:image:alt | Bug report Bug description: https://no-color.org/ Command-line software which adds ANSI color to its output by default should check for a NO_COLOR environment variable that, when present and not an... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width