Skip to content

Commit 77ab680

Browse files
authored
Merge pull request #98 from Lee-W/fix-config-name-overwritten-error
Fix config name overwritten error
2 parents a06ad63 + fc4e2d7 commit 77ab680

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

commitizen/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def main():
155155
out.error("Command is required")
156156
raise SystemExit()
157157

158-
if args.name:
158+
if args.name and not conf["name"]:
159159
conf.update({"name": args.name})
160160

161161
if args.version:

commitizen/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def read_cfg() -> dict:
118118
conf = read_pyproject_conf(data)
119119
else:
120120
warnings.warn(
121-
".cz, setup.cfg, and .cz.cgf will be deprecated "
121+
".cz, setup.cfg, and .cz.cfg will be deprecated "
122122
"in next major version. \n"
123123
'Please use "pyproject.toml", ".cz.toml" instead'
124124
)

0 commit comments

Comments
 (0)