all repos — searchix @ bc04964c3405f9d50bbad7193b61ed62d9e64498

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

feat: improve error logging during import

Alan Pearce
commit

bc04964c3405f9d50bbad7193b61ed62d9e64498

parent

63b7c86b3b3433d1b070e07efc899893d5820755

1 file changed, 9 insertions(+), 4 deletions(-)

changed files
M internal/importer/utils.gointernal/importer/utils.go
@@ -85,6 +85,10 @@ go func() {
for { select { case err, running := <-srcErrs: + if err != nil { + hadObjectErrors = true + log.Warn("error processing object from source", "error", err) + } if !running { wg.Done() srcErrs = nil
@@ -92,17 +96,18 @@ log.Debug("processing completed")
continue } - hadObjectErrors = true - log.Warn("error processing object from source", "error", err) case err, running := <-dstErrors: + if err != nil { + hadObjectErrors = true + log.Warn("error writing object to target", "error", err) + + } if !running { wg.Done() dstErrors = nil continue } - hadObjectErrors = true - log.Warn("error writing object to target", "error", err) } } }()