Skip to content

Commit 78f3472

Browse files
authored
Merge pull request #543 from commitizen-tools/542
use error_code to do "is_signed_tag" check to avoid language issue
2 parents 05ab7ad + ae5a98e commit 78f3472

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

commitizen/git.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import os
2-
import re
32
from pathlib import Path
43
from tempfile import NamedTemporaryFile
54
from typing import List, Optional
@@ -143,11 +142,7 @@ def tag_exist(tag: str) -> bool:
143142

144143

145144
def is_signed_tag(tag: str) -> bool:
146-
c = cmd.run(f"git tag -v {tag}")
147-
_ret = False
148-
if re.match("gpg: Signature made [0-9/:A-Za-z ]*", c.err):
149-
_ret = True
150-
return _ret
145+
return cmd.run(f"git tag -v {tag}").return_code == 0
151146

152147

153148
def get_latest_tag_name() -> Optional[str]:

0 commit comments

Comments
 (0)