chore: display warning only when directory is present (#7050)

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-11-03 18:56:47 +01:00
committed by GitHub
parent 3ce9cb566d
commit d424a27fa2

View File

@@ -4,6 +4,7 @@ package gallery
import (
"encoding/json"
"errors"
"fmt"
"os"
"path/filepath"
@@ -310,8 +311,10 @@ func ListSystemBackends(systemState *system.SystemState) (SystemBackends, error)
}
}
}
} else {
} else if !errors.Is(err, os.ErrNotExist) {
log.Warn().Err(err).Msg("Failed to read system backends, proceeding with user-managed backends")
} else if errors.Is(err, os.ErrNotExist) {
log.Debug().Msg("No system backends found")
}
// User-managed backends and alias collection