@@ -58,7 +58,7 @@ def load(cli):
5858 if getattr (ctrl , 'subcmd' , False ) or getattr (ctrl , 'type' , None ) == 'legacy' :
5959 for arg in ctrl .args : exempt_flags .append (arg )
6060 if unknown_args and not all (any (arg .startswith (exempt ) for exempt in exempt_flags ) for arg in unknown_args ):
61- log .help_cmd_docs_url_exit (cli , f"{ cli .msgs .err_UNRECOGNIZED_ARGS } : { ' ' .join (unknown_args )} " )
61+ log .cmd_docs_url_exit (cli , f"{ cli .msgs .err_UNRECOGNIZED_ARGS } : { ' ' .join (unknown_args )} " , cmd = 'help' )
6262 for ctrl_key , ctrl in vars (controls ).items (): # process subcmds
6363 if getattr (ctrl , 'subcmd' , False ) and next (arg for arg in ctrl .args if arg .startswith ('--' ))[2 :] in sys .argv :
6464 setattr (parsed_args , ctrl_key , True )
@@ -74,10 +74,10 @@ def load(cli):
7474 if hasattr (cli .config , key ):
7575 setattr (cli .config , key , val )
7676 else :
77- log .init_cmd_docs_url_exit (cli ,
77+ log .cmd_docs_url_exit (cli ,
7878 f"{ cli .msgs .err_INVALID_KEY } '{ key } ' { cli .msgs .err_FOUND_IN } "
79- f'\n { log .colors .gry } { cli .config_filepath } '
80- )
79+ f'\n { log .colors .gry } { cli .config_filepath } ' ,
80+ cmd = 'init' )
8181 log .debug ('Config file loaded!' , cli )
8282 else :
8383 log .debug ('No config file found.' )
0 commit comments