|
22 | 22 | from .vendor.myutils import at_dir, file_lock |
23 | 23 | from .vendor.htmlutils import parse_document_from_httpx |
24 | 24 |
|
25 | | -from .cmd import git_pull, git_push, UNTRUSTED_PREFIX |
| 25 | +from .cmd import git_push, UNTRUSTED_PREFIX |
26 | 26 | from .cmd import run_cmd as _run_cmd |
27 | 27 | from . import const, intl |
28 | 28 | from .const import _G, SPECIAL_FILES |
@@ -365,17 +365,20 @@ def _aur_exists(pkgbase: str) -> bool: |
365 | 365 |
|
366 | 366 | def _ensure_aur_repo(pkgbase: str) -> Path: |
367 | 367 | lockfile = const.AUR_REPO_DIR / (pkgbase + '.lock') |
| 368 | + env = os.environ.copy() |
| 369 | + env['GIT_SSH_COMMAND'] = 'ssh -o ControlPersist=no' |
368 | 370 | with file_lock(lockfile): |
369 | 371 | aurpath = const.AUR_REPO_DIR / pkgbase |
370 | 372 | if not aurpath.is_dir(): |
371 | 373 | logger.info('cloning AUR repo: %s', aurpath) |
372 | 374 | with at_dir(const.AUR_REPO_DIR): |
373 | | - _run_cmd([ 'git', 'clone', f'[email protected]:{pkgbase}.git']) |
| 375 | + _run_cmd([ 'git', 'clone', f'[email protected]:{pkgbase}.git'], |
| 376 | + env=env) |
374 | 377 | else: |
375 | 378 | with at_dir(aurpath): |
376 | 379 | # reset everything, dropping local commits |
377 | 380 | _run_cmd(['git', 'reset', '--hard', 'origin/master']) |
378 | | - git_pull() |
| 381 | + _run_cmd(['git', 'pull', '--no-edit'], env=env) |
379 | 382 |
|
380 | 383 | return aurpath |
381 | 384 |
|
|
0 commit comments