Merge pull request #66 from infosiftr/fetch-failures-context

Add more context to "git fetch" failures
This commit is contained in:
Tianon Gravi 2023-02-21 16:27:41 -08:00 committed by GitHub
commit 6177415d06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -254,13 +254,14 @@ func (r Repo) fetchGitRepo(arch string, entry *manifest.Manifest2822Entry) (stri
//Progress: os.Stdout,
})
if err != nil {
fetchErrors = append(fetchErrors, err)
fetchErrors = append(fetchErrors, fmt.Errorf("failed fetching %q: %w", fetchString, err))
continue
}
commit, err = getGitCommit(entry.ArchGitCommit(arch))
archCommit := entry.ArchGitCommit(arch)
commit, err = getGitCommit(archCommit)
if err != nil {
fetchErrors = append(fetchErrors, err)
fetchErrors = append(fetchErrors, fmt.Errorf("failed finding Git commit %q after fetching %q: %w", archCommit, fetchString, err))
continue
}