Skip to content

Commit

Permalink
Respect NO_COLOR environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-n committed Sep 22, 2023
1 parent 05a0571 commit e6e031b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions poethepoet/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@


def guess_ansi_support(file):
if os.environ.get("NO_COLOR", "0")[0] != "0":
# https://no-color.org/
return False

return (
(sys.platform != "win32" or "ANSICON" in os.environ)
and hasattr(file, "isatty")
Expand Down

0 comments on commit e6e031b

Please sign in to comment.