We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b4f8b0 commit 312ca49Copy full SHA for 312ca49
commitizen/cli.py
@@ -52,16 +52,13 @@ def __call__(
52
) -> None:
53
if not isinstance(values, str):
54
return
55
- if "=" not in values:
+
56
+ key, sep, value = values.partition("=")
57
+ if not key or not sep:
58
raise InvalidCommandArgumentError(
59
f"Option {option_string} expect a key=value format"
60
)
61
kwargs = getattr(namespace, self.dest, None) or {}
- key, value = values.split("=", 1)
- if not key:
62
- raise InvalidCommandArgumentError(
63
- f"Option {option_string} expect a key=value format"
64
- )
65
kwargs[key] = value.strip("'\"")
66
setattr(namespace, self.dest, kwargs)
67
0 commit comments