From 1601958db14cb3d3ad1d14ae0b4c8428d3206ddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Fabianski?= Date: Fri, 25 Aug 2023 14:52:56 +0200 Subject: [PATCH] fix: handle empty list to scan for orchestrator (#1209) --- pkg/commands/process/orchestrator/orchestrator.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/commands/process/orchestrator/orchestrator.go b/pkg/commands/process/orchestrator/orchestrator.go index 9640be605..727305627 100644 --- a/pkg/commands/process/orchestrator/orchestrator.go +++ b/pkg/commands/process/orchestrator/orchestrator.go @@ -85,6 +85,11 @@ func (orchestrator *Orchestrator) waitForScan(fileComplete chan struct{}, totalC } }() + if totalCount == 0 { + log.Debug().Msgf("no files to scan") + return + } + for { select { case <-orchestrator.done: