File tree Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Expand file tree Collapse file tree 3 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ classifiers = [
48
48
" Topic :: Utilities" ,
49
49
]
50
50
dependencies = [
51
- " colorama; sys_platform=='win32'" ,
51
+ " colorama==0.4.6 ; sys_platform=='win32'" ,
52
52
" shtab>=1.3.10" ,
53
53
" termcolor" ,
54
54
]
Original file line number Diff line number Diff line change 1
1
termcolor
2
- colorama == 0.4.6
2
+ colorama == 0.4.6 ; sys_platform == 'win32'
3
3
shtab >= 1.3.10
Original file line number Diff line number Diff line change @@ -682,6 +682,7 @@ def main() -> None:
682
682
display_option_length = "long"
683
683
if options .short_options and options .long_options :
684
684
display_option_length = "both"
685
+
685
686
if sys .platform == "win32" :
686
687
import colorama
687
688
colorama .init (strip = options .color )
@@ -744,6 +745,17 @@ def main() -> None:
744
745
).format (cmd = command ))
745
746
else :
746
747
output (results [0 ][0 ], display_option_length , plain = options .markdown )
748
+
749
+ if results [0 ][1 ] not in (get_platform (), "common" ) and not options .platform :
750
+ warning_suffix = (
751
+ f": showing page from platform '{ results [0 ][1 ]} ', "
752
+ f"because '{ command } ' does not exist in '{ get_platform ()} ' and 'common'."
753
+ )
754
+ if options .markdown :
755
+ print (f"warning{ warning_suffix } " )
756
+ else :
757
+ print (f"{ colored ('warning' , 'yellow' )} { warning_suffix } " )
758
+
747
759
if results [1 :]:
748
760
platforms_str = [result [1 ] for result in results [1 :]]
749
761
are_multiple_platforms = len (platforms_str ) > 1
You can’t perform that action at this time.
0 commit comments