Skip to content

Commit e5629e5

Browse files
committed
fix(commit): avoid warnings with 'always_signoff' configuration
Signed-off-by: Adrian DC <[email protected]>
1 parent cf9c847 commit e5629e5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: commitizen/commands/commit.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,17 @@ def __call__(self):
110110
if dry_run:
111111
raise DryRunExit()
112112

113-
signoff: bool = (
114-
self.arguments.get("signoff") or self.config.settings["always_signoff"]
115-
)
113+
always_signoff: bool = self.config.settings["always_signoff"]
114+
signoff: bool = self.arguments.get("signoff")
116115

117116
extra_args = self.arguments.get("extra_cli_args", "")
118117

119118
if signoff:
120119
out.warn(
121120
"signoff mechanic is deprecated, please use `cz commit -- -s` instead."
122121
)
122+
123+
if always_signoff or signoff:
123124
if extra_args:
124125
extra_args += " "
125126
extra_args += "-s"

0 commit comments

Comments
 (0)