Skip to content

Commit 18e4928

Browse files
AdrianDCLee-W
authored andcommitted
fix(commit): avoid warnings with 'always_signoff' configuration
Signed-off-by: Adrian DC <[email protected]>
1 parent 26be522 commit 18e4928

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

commitizen/commands/commit.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -134,16 +134,17 @@ def __call__(self):
134134
if dry_run:
135135
raise DryRunExit()
136136

137-
signoff: bool = (
138-
self.arguments.get("signoff") or self.config.settings["always_signoff"]
139-
)
137+
always_signoff: bool = self.config.settings["always_signoff"]
138+
signoff: bool = self.arguments.get("signoff")
140139

141140
extra_args = self.arguments.get("extra_cli_args", "")
142141

143142
if signoff:
144143
out.warn(
145144
"signoff mechanic is deprecated, please use `cz commit -- -s` instead."
146145
)
146+
147+
if always_signoff or signoff:
147148
extra_args = f"{extra_args} -s".strip()
148149

149150
c = git.commit(m, args=extra_args)

0 commit comments

Comments
 (0)