@@ -28,6 +28,7 @@ def show(settings: Box, args: argparse.Namespace) -> None:
2828 heading .extend ([ p for p in settings .providers .keys () if p != 'external' ])
2929
3030 rows = []
31+ caveats = []
3132 result = data .get_empty_box ()
3233 for device in sorted (settings .devices .keys ()):
3334 if device in DEVICES_TO_SKIP :
@@ -39,12 +40,18 @@ def show(settings: Box, args: argparse.Namespace) -> None:
3940 row = [ device ]
4041 has_image = False
4142 for p in heading [1 :]:
42- p_image = settings .devices [device ][p ]. get ( "image" , "" )
43- row . append ( p_image )
43+ p_data = settings .devices [device ][p ]
44+ p_image = p_data . get ( "image" , "" )
4445 if p_image :
4546 result [device ][p ] = p_image
47+ if p_data .caveats :
48+ data .append_to_list (result [device ],'caveats' ,p_data .caveats ,flatten = True )
49+ caveats .extend (p_data .caveats if isinstance (p_data .caveats ,list ) else [ p_data .caveats ])
50+ p_image = '❗' + p_image
4651 has_image = True
4752
53+ row .append (p_image )
54+
4855 if has_image :
4956 rows .append (row )
5057
@@ -56,5 +63,10 @@ def show(settings: Box, args: argparse.Namespace) -> None:
5663 print (f"{ args .device } image names { p_text } " )
5764 print ("" )
5865 strings .print_table (heading ,rows ,inter_row_line = False )
66+ if caveats :
67+ strings .print_colored_text ('\n Caveats:\n \n ' ,color = 'bold' )
68+ for cv in caveats :
69+ print (strings .wrap_error_message (f'* { cv } ' ,indent = 2 ))
70+
5971 elif args .format in ['text' ,'yaml' ]:
6072 print (strings .get_yaml_string (result ))
0 commit comments