From c0d103f2e89bf32c8ab72ac2e57817f710478945 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Sat, 4 Jan 2025 12:33:26 +0100 Subject: [PATCH] fix: add and remove not_for_commandline property --- src/rougail/cli/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rougail/cli/__main__.py b/src/rougail/cli/__main__.py index 4c0cbec..bb81c1c 100644 --- a/src/rougail/cli/__main__.py +++ b/src/rougail/cli/__main__.py @@ -38,7 +38,8 @@ def _main(): backward_compatibility=False, add_extra_options=False ) cmd_config = rougailconfig.config - cmd_config.property.setdefault(frozenset("not_for_commandline"), 'read_write', 'append') + origin_prop = cmd_config.property.default('read_write', 'append') + cmd_config.property.setdefault(frozenset(origin_prop | {"not_for_commandline"}), 'read_write', 'append') cmd_config.property.read_write() if RougailUserDataEnvironment: fake_rougail_config = {'step.user_data': 'environment', @@ -51,6 +52,7 @@ def _main(): short_name_max_len=2, ) parser.parse_args() + cmd_config.property.setdefault(origin_prop, 'read_write', 'append') cmd_config.property.remove("not_for_commandline") cmd_config.property.read_only() try: