@@ -2840,32 +2840,34 @@ def recipes(self, args):
2840
2840
2841
2841
args = parser .parse_args (args )
2842
2842
2843
+ Fore = Out_Fore
2844
+ Style = Out_Style
2845
+ if not args .color :
2846
+ Fore = Null_Fore
2847
+ Style = Null_Style
2848
+
2843
2849
if args .compact :
2844
2850
print (" " .join (list (Recipe .list_recipes ())))
2845
2851
else :
2846
2852
ctx = self .ctx
2847
2853
for name in sorted (Recipe .list_recipes ()):
2848
2854
recipe = Recipe .get_recipe (name , ctx )
2849
2855
version = str (recipe .version )
2850
- if args .color :
2851
- print ('{Fore.BLUE}{Style.BRIGHT}{recipe.name:<12} '
2852
- '{Style.RESET_ALL}{Fore.LIGHTBLUE_EX}'
2853
- '{version:<8}{Style.RESET_ALL}' .format (
2854
- recipe = recipe , Fore = Out_Fore , Style = Out_Style ,
2855
- version = version ))
2856
- print (' {Fore.GREEN}depends: {recipe.depends}'
2857
- '{Fore.RESET}' .format (recipe = recipe , Fore = Out_Fore ))
2858
- if recipe .conflicts :
2859
- print (' {Fore.RED}conflicts: {recipe.conflicts}'
2860
- '{Fore.RESET}'
2861
- .format (recipe = recipe , Fore = Out_Fore ))
2862
- else :
2863
- print ("{recipe.name:<12} {recipe.version:<8}"
2864
- .format (recipe = recipe ))
2865
- print (' depends: {recipe.depends}'
2866
- .format (recipe = recipe ))
2867
- print (' conflicts: {recipe.conflicts}'
2868
- .format (recipe = recipe ))
2856
+ print ('{Fore.BLUE}{Style.BRIGHT}{recipe.name:<12} '
2857
+ '{Style.RESET_ALL}{Fore.LIGHTBLUE_EX}'
2858
+ '{version:<8}{Style.RESET_ALL}' .format (
2859
+ recipe = recipe , Fore = Fore , Style = Style ,
2860
+ version = version ))
2861
+ print (' {Fore.GREEN}depends: {recipe.depends}'
2862
+ '{Fore.RESET}' .format (recipe = recipe , Fore = Fore ))
2863
+ if recipe .conflicts :
2864
+ print (' {Fore.RED}conflicts: {recipe.conflicts}'
2865
+ '{Fore.RESET}'
2866
+ .format (recipe = recipe , Fore = Fore ))
2867
+ if recipe .opt_depends :
2868
+ print (' {Fore.YELLOW}optional depends: '
2869
+ '{recipe.opt_depends}{Fore.RESET}'
2870
+ .format (recipe = recipe , Fore = Fore ))
2869
2871
2870
2872
def bootstraps (self , args ):
2871
2873
'''List all the bootstraps available to build with.'''
0 commit comments