Skip to content

Commit

Permalink
fix: use LinuxColorPrinter if MSYSTEM envvar is set
Browse files Browse the repository at this point in the history
  • Loading branch information
umarcor authored and 1138-4EB committed Sep 12, 2019
1 parent c25796e commit 82c907d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vunit/color_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Provides capability to print in color to the terminal in both Windows and Linux.
"""

import os
import sys
import ctypes
from ctypes import Structure, c_short, c_ushort, byref
Expand Down Expand Up @@ -196,7 +197,7 @@ def write(text, output_file=None, fg=None, bg=None): # pylint: disable=unused-a


NO_COLOR_PRINTER = NoColorPrinter()
if IS_WINDOWS_SYSTEM:
if IS_WINDOWS_SYSTEM and ('MSYSTEM' not in os.environ):
COLOR_PRINTER = Win32ColorPrinter()
else:
COLOR_PRINTER = LinuxColorPrinter()

0 comments on commit 82c907d

Please sign in to comment.