mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-22 21:25:43 -05:00
packages: clone_pkgbuilds(): use git remote update
before git switch
This commit is contained in:
parent
56dbd3966c
commit
f395ef231b
1 changed files with 4 additions and 1 deletions
|
@ -33,9 +33,12 @@ def clone_pkgbuilds(pkgbuilds_dir: str, repo_url: str, branch: str, interactive=
|
|||
if current_branch != branch:
|
||||
logging.warning(f'pkgbuilds repository is on the wrong branch: {current_branch}, requested: {branch}')
|
||||
if interactive and click.confirm('Would you like to switch branches?', default=False):
|
||||
result = git(['remote', 'update'], dir=pkgbuilds_dir)
|
||||
if result.returncode != 0:
|
||||
raise Exception('failed updating PKGBUILDs branches')
|
||||
result = git(['switch', branch], dir=pkgbuilds_dir)
|
||||
if result.returncode != 0:
|
||||
raise Exception('failed switching branches')
|
||||
raise Exception('failed switching PKGBUILDs branches')
|
||||
if update:
|
||||
if interactive:
|
||||
if not click.confirm('Would you like to try updating the PKGBUILDs repo?'):
|
||||
|
|
Loading…
Add table
Reference in a new issue