fix empty mirror check

This commit is contained in:
André Roth
2024-07-23 12:55:09 +02:00
parent deae90485a
commit 09a44ba409

View File

@@ -45,7 +45,7 @@ type Snapshot struct {
// NewSnapshotFromRepository creates snapshot from current state of repository
func NewSnapshotFromRepository(name string, repo *RemoteRepo) (*Snapshot, error) {
if repo.packageRefs == nil {
if repo.packageRefs == nil || repo.packageRefs.Len() == 0 {
return nil, errors.New("mirror not updated")
}