Skip to content

Commit 8de221a

Browse files
committed
Added cli.name fallback for config filename
1 parent bc531d0 commit 8de221a

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

  • remove-json-keys/src/remove_json_keys/lib
  • translate-messages/src/translate_messages/lib

remove-json-keys/src/remove_json_keys/lib/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def config_file(cli: sn) -> None: # for --init
2323
user_resp = input(f'{cli.msgs.prompt_INIT_CONFIG_HERE_ANYWAY}? (y/N): ').strip().lower()
2424
if not user_resp.startswith('y') : return
2525
config_dir, in_project_root = Path.cwd(), False
26-
target_path = config_dir / f'.{cli.short_name}.config.json5'
26+
target_path = config_dir / f'.{ cli.short_name or cli.name }.config.json5'
2727

2828
# Handle existing file
2929
if target_path.exists():

translate-messages/src/translate_messages/lib/init.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def config_file(cli: sn) -> None: # for --init
2323
user_resp = input(f'{cli.msgs.prompt_INIT_CONFIG_HERE_ANYWAY}? (y/N): ').strip().lower()
2424
if not user_resp.startswith('y') : return
2525
config_dir, in_project_root = Path.cwd(), False
26-
target_path = config_dir / f'.{cli.short_name}.config.json5'
26+
target_path = config_dir / f'.{ cli.short_name or cli.name }.config.json5'
2727

2828
# Handle existing file
2929
if target_path.exists():

0 commit comments

Comments
 (0)