fix: do not display full help to early
This commit is contained in:
parent
ba0b326b56
commit
ba82f91cc6
2 changed files with 5 additions and 3 deletions
|
|
@ -90,7 +90,7 @@ def load_cmd_user_datas(rougailconfig, arguments):
|
|||
env_prefix = ENV_PREFIX
|
||||
else:
|
||||
env_prefix = None
|
||||
user_data = rougailconfig_load(rougailconfig, config_file, env_prefix, True, _arguments=arguments, _generate=False)
|
||||
user_data = rougailconfig_load(rougailconfig, config_file, env_prefix, True, _arguments=arguments, _generate=False, _add_help=False)
|
||||
display_warnings = rougailconfig["cli.warnings"]
|
||||
manage_warnings(display_warnings)
|
||||
if not cmd_config.option("cli.versions").value.get():
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ def load(rougailconfig: "RougailConfig",
|
|||
env_prefix: str=None,
|
||||
commandline: bool=False,
|
||||
_arguments=None,
|
||||
_add_help=True,
|
||||
_generate=True
|
||||
):
|
||||
if _generate:
|
||||
|
|
@ -36,7 +37,7 @@ def load(rougailconfig: "RougailConfig",
|
|||
if env_prefix:
|
||||
user_datas.extend(from_env(cmd_config, env_prefix))
|
||||
if commandline:
|
||||
user_datas.extend(from_cmdline(cmd_config, _arguments))
|
||||
user_datas.extend(from_cmdline(cmd_config, _arguments, _add_help))
|
||||
user_data = UserDatas(cmd_config).user_datas(user_datas)
|
||||
cmd_config.property.importation(origin_prop)
|
||||
return user_data
|
||||
|
|
@ -68,7 +69,7 @@ def from_env(cmd_config, env_prefix):
|
|||
).run()
|
||||
|
||||
|
||||
def from_cmdline(cmd_config, arguments):
|
||||
def from_cmdline(cmd_config, arguments, add_help):
|
||||
from rougail.user_data_commandline import RougailUserDataCommandline
|
||||
fake_rougail_config = {
|
||||
"step.user_data": ["commandline"],
|
||||
|
|
@ -77,4 +78,5 @@ def from_cmdline(cmd_config, arguments):
|
|||
rougailconfig=fake_rougail_config,
|
||||
short_name_max_len=2,
|
||||
arguments=arguments,
|
||||
add_help=add_help,
|
||||
).run()
|
||||
|
|
|
|||
Loading…
Reference in a new issue