File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
termcolor
2
- colorama
2
+ colorama ; sys_platform == 'win32'
3
3
shtab >= 1.3.10
Original file line number Diff line number Diff line change 15
15
from urllib .request import urlopen , Request
16
16
from urllib .error import HTTPError , URLError
17
17
from termcolor import colored
18
- import colorama # Required for Windows
19
18
import shtab
20
19
21
20
__version__ = "3.3.0"
@@ -643,6 +642,7 @@ def main() -> None:
643
642
parser = create_parser ()
644
643
645
644
options = parser .parse_args ()
645
+
646
646
display_option_length = "long"
647
647
if not (options .short_options or options .long_options ):
648
648
if os .environ .get ('TLDR_OPTIONS' ) == "short" :
@@ -657,7 +657,10 @@ def main() -> None:
657
657
display_option_length = "long"
658
658
if options .short_options and options .long_options :
659
659
display_option_length = "both"
660
- colorama .init (strip = options .color )
660
+ if sys .platform == "win32" :
661
+ import colorama
662
+ colorama .init (strip = options .color )
663
+
661
664
if options .color is False :
662
665
os .environ ["FORCE_COLOR" ] = "true"
663
666
You can’t perform that action at this time.
0 commit comments