File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 22
33import os
44import re
5+ import subprocess
56import sys
67import tempfile
78from pathlib import Path
@@ -145,11 +146,19 @@ def tmp_commitizen_project_with_gpg(tmp_commitizen_project):
145146
146147 try :
147148 # create a key (a keyring will be generated within GPUPGHOME)
148- c = cmd .run (
149- f"gpg --batch --yes --debug-quick-random --passphrase '' --quick-gen-key '{ SIGNER } { SIGNER_MAIL } '"
149+ subprocess .run (
150+ [
151+ "gpg" ,
152+ "--batch" ,
153+ "--yes" ,
154+ "--debug-quick-random" ,
155+ "--passphrase" ,
156+ "" ,
157+ "--quick-gen-key" ,
158+ f"{ SIGNER } { SIGNER_MAIL } " ,
159+ ],
160+ check = True ,
150161 )
151- if c .return_code != 0 :
152- raise Exception (f"gpg keygen failed with err: '{ c .err } '" )
153162 key_id = _get_gpg_keyid (SIGNER_MAIL )
154163 assert key_id
155164
You can’t perform that action at this time.
0 commit comments