Skip to content

Commit d424a27

Browse files
authored
chore: display warning only when directory is present (#7050)
Signed-off-by: Ettore Di Giacinto <[email protected]>
1 parent 3ce9cb5 commit d424a27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/gallery/backends.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ package gallery
44

55
import (
66
"encoding/json"
7+
"errors"
78
"fmt"
89
"os"
910
"path/filepath"
@@ -310,8 +311,10 @@ func ListSystemBackends(systemState *system.SystemState) (SystemBackends, error)
310311
}
311312
}
312313
}
313-
} else {
314+
} else if !errors.Is(err, os.ErrNotExist) {
314315
log.Warn().Err(err).Msg("Failed to read system backends, proceeding with user-managed backends")
316+
} else if errors.Is(err, os.ErrNotExist) {
317+
log.Debug().Msg("No system backends found")
315318
}
316319

317320
// User-managed backends and alias collection

0 commit comments

Comments
 (0)