Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
- fix issue listing multilib repos
- fix issue with duplicate detection breaking when repo contains name of
  another repo
  • Loading branch information
trgeiger committed May 28, 2024
1 parent 328b707 commit fb44606
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/app/copr-repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (c *CoprRepo) FindLocalFiles(fs afero.Fs) error {
return err
}
for _, file := range files {
result, err := afero.FileContainsBytes(fs, ReposDir+file.Name(), []byte(c.Name()))
result, err := afero.FileContainsBytes(fs, ReposDir+file.Name(), []byte("/"+c.Name()+"/"))
if err != nil {
return err
}
Expand Down
2 changes: 2 additions & 0 deletions internal/app/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ func GetReposList(fs afero.Fs, out io.Writer, state RepoState) ([]*CoprRepo, err
// If we see our desired state, flip our flag
if strings.Contains(scanner.Text(), string(state)) && isCoprRepo {
addToResult = true
// Break once we have a result from the first config block
break
}
}
if addToResult && !slices.Contains(reposStrings, repoName) {
Expand Down

0 comments on commit fb44606

Please sign in to comment.