File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11termcolor 
2- colorama 
2+ colorama ;  sys_platform == 'win32' 
33shtab >= 1.3.10 
Original file line number Diff line number Diff line change 1515from  urllib .request  import  urlopen , Request 
1616from  urllib .error  import  HTTPError , URLError 
1717from  termcolor  import  colored 
18- import  colorama   # Required for Windows 
1918import  shtab 
2019
2120__version__  =  "3.3.0" 
@@ -643,6 +642,7 @@ def main() -> None:
643642    parser  =  create_parser ()
644643
645644    options  =  parser .parse_args ()
645+ 
646646    display_option_length  =  "long" 
647647    if  not  (options .short_options  or  options .long_options ):
648648        if  os .environ .get ('TLDR_OPTIONS' ) ==  "short" :
@@ -657,7 +657,10 @@ def main() -> None:
657657        display_option_length  =  "long" 
658658    if  options .short_options  and  options .long_options :
659659        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+ 
661664    if  options .color  is  False :
662665        os .environ ["FORCE_COLOR" ] =  "true" 
663666
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments