Skip to content

Commit

Permalink
Update the config with the repos we have searchers for
Browse files Browse the repository at this point in the history
  • Loading branch information
jklein committed Jan 30, 2015
1 parent 29ea717 commit 020504d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hound/cmds/houndd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ func makeSearchers(
}
}

validRepos := map[string]*config.Repo{}
// Now build and initialize a searcher for each repo.
// TODO(knorton): These could be done in parallel.
m := map[string]*searcher.Searcher{}
Expand All @@ -194,6 +195,7 @@ func makeSearchers(

if err == nil {
m[strings.ToLower(name)] = s
validRepos[name] = repo
}

}
Expand All @@ -202,6 +204,8 @@ func makeSearchers(
err = errors.New("One or more repos failed to index")
}

// Update the config to only include repos we have successfully indexed
cfg.Repos = validRepos
return m, err
}

Expand Down

0 comments on commit 020504d

Please sign in to comment.