File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,19 @@ class Args:
2626
2727 actions: List[str]
2828 The actions that the user wants to execute
29+
30+ debug_mode: bool
31+ Enable debug logging
32+
33+ supress_messages: bool
34+ Supress BpyBuild output
2935 """
3036
3137 path : Path = field (default = Path ("bpy-build.yaml" ))
3238 versions : List [float ] = field (default = [])
3339 actions : List [str ] = field (default = ["default" ])
3440 debug_mode : bool = field (default = False )
41+ supress_messages : bool = field (default = False )
3542
3643 @path .validator
3744 def path_validate (self , _ : Attribute , value : Path ) -> None :
@@ -109,6 +116,13 @@ def parse_args() -> Args:
109116 default = False ,
110117 action = "store_true" ,
111118 )
119+ parser .add_argument (
120+ "-s" ,
121+ "--supress-output" ,
122+ help = "Supress all BpyBuild output except for build actions. This does not apply to debug logs" ,
123+ default = False ,
124+ action = "store_true" ,
125+ )
112126
113127 args : Namespace = parser .parse_args ()
114128 config : str = "bpy-build.yaml"
@@ -130,4 +144,5 @@ def parse_args() -> Args:
130144 cast (List [float ], args .versions ),
131145 cast (List [str ], actions ),
132146 cast (bool , args .debug_mode ),
147+ cast (bool , args .supress_output ),
133148 )
Original file line number Diff line number Diff line change @@ -134,9 +134,10 @@ def install(self, build_path: Path) -> None:
134134 if addon_path .exists ():
135135 shutil .rmtree (addon_path )
136136 shutil .unpack_archive (build_path , path )
137- console .print (f"Installed to { str (path )} " , style = "green" )
137+ if not self .cli .supress_messages :
138+ console .print (f"Installed to { str (path )} " , style = "green" )
138139 installed = True
139- if not installed :
140+ if not installed and not self . cli . supress_messages :
140141 console .print (f"Cound not find { v } " , style = "yellow" )
141142
142143 def action (self , action : str , folder : Path ) -> None :
You can’t perform that action at this time.
0 commit comments