all repos — searchix @ dedd43f7a653ccf3ccda11c9a6f34bbc227aa484

Search engine for NixOS, nix-darwin, home-manager and NUR users

fix: missing index step when new sources added to configuration

Alan Pearce
commit

dedd43f7a653ccf3ccda11c9a6f34bbc227aa484

parent

b48c62846f9bdbb1879228de3f7f5ea52646e306

1 file changed, 7 insertions(+), 2 deletions(-)

changed files
M internal/importer/main.gointernal/importer/main.go
@@ -61,7 +61,7 @@
return nil } - imp.options.Logger.Debug("starting importer", "timeout", imp.config.Importer.Timeout.Duration) + imp.options.Logger.Debug("starting fetch", "timeout", imp.config.Importer.Timeout.Duration) importCtx, cancelImport := context.WithTimeout( ctx, imp.config.Importer.Timeout.Duration,
@@ -152,7 +152,12 @@ false,
newSources, ) if err != nil { - return fault.Wrap(err, fmsg.With("Failed to update index with new sources")) + return fault.Wrap(err, fmsg.With("Failed to fetch new sources")) + } + + err = imp.Index(ctx, newSources) + if err != nil { + return fault.Wrap(err, fmsg.With("Failed to index new sources")) } } if len(retiredSources) > 0 {