mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 06:20:08 +01:00
fix messages of 'init --dry'
This commit is contained in:
parent
7239679296
commit
a28e508e3c
1 changed files with 4 additions and 4 deletions
|
|
@ -179,13 +179,13 @@ def init(verbose: int = 0, dry: bool = False) -> None:
|
|||
cfg: config.MaybeConfig = config.parse(ctx)
|
||||
|
||||
if cfg:
|
||||
log.error("Configuration already initialized in {ctx.config_filepath}")
|
||||
log.error(f"Configuration already initialized in {ctx.config_filepath}")
|
||||
sys.exit(1)
|
||||
|
||||
if dry:
|
||||
print("Exiting because of '--dry'. Would have written to {ctx.config_filepath}:")
|
||||
cfg_lines = config.default_config(ctx)
|
||||
print("\n " + "\n ".join(cfg_lines))
|
||||
print(f"Exiting because of '--dry'. Would have written to {ctx.config_filepath}:")
|
||||
cfg_text: str = config.default_config(ctx)
|
||||
print("\n " + "\n ".join(cfg_text.splitlines()))
|
||||
sys.exit(0)
|
||||
|
||||
config.write_content(ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue