File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -154,6 +154,13 @@ def build_parser(
154154 help = "Generate reference config from system. Writes to ./reference_config.json." ,
155155 )
156156
157+ parser .add_argument (
158+ "--skip-sudo" ,
159+ dest = "skip_sudo" ,
160+ action = "store_true" ,
161+ help = "Skip plugins that require sudo permissions" ,
162+ )
163+
157164 subparsers = parser .add_subparsers (dest = "subcmd" , help = "Subcommands" )
158165
159166 summary_parser = subparsers .add_parser (
@@ -418,6 +425,10 @@ def main(arg_input: Optional[list[str]] = None):
418425 plugin_subparser_map = plugin_subparser_map ,
419426 )
420427
428+ if parsed_args .skip_sudo :
429+ for pcfg in plugin_config_inst_list :
430+ pcfg .global_args .setdefault ("collection_args" , {})["skip_sudo" ] = True
431+
421432 log_system_info (log_path , system_info , logger )
422433 except Exception as e :
423434 parser .error (str (e ))
You can’t perform that action at this time.
0 commit comments