mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
vcs_git: clearer error messages for checkrepo()
This updates error messages the help identify issues when loading srclibs and fixes pushing srclibs into build vms/containers.
This commit is contained in:
parent
0d88a94192
commit
046c527ee8
1 changed files with 7 additions and 2 deletions
|
@ -1523,10 +1523,15 @@ class vcs_git(vcs):
|
|||
it! This is called as a safety check.
|
||||
|
||||
"""
|
||||
p = FDroidPopen(['git', 'rev-parse', '--show-toplevel'], cwd=self.local, output=False)
|
||||
cmd = ['git', 'rev-parse', '--show-toplevel']
|
||||
p = FDroidPopen(cmd, cwd=self.local, output=False)
|
||||
result = p.output.rstrip()
|
||||
if p.returncode > 0:
|
||||
raise VCSException(
|
||||
f"error: `{' '.join(cmd)}` failed, (in '{os.path.abspath(self.local)}') {result}"
|
||||
)
|
||||
if Path(result) != Path(self.local).resolve():
|
||||
raise VCSException('Repository mismatch')
|
||||
raise VCSException(f"Repository mismatch ('{self.local}' != '{result}')")
|
||||
|
||||
def gotorevisionx(self, rev):
|
||||
if not os.path.exists(self.local):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue