mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-19 07:28:08 +00:00
fix: security scanner warning noise: error handlers part 2 (#2145)
check off a few more error handlers Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
@ -64,7 +64,11 @@ func (mi *ModelsInstall) Run(ctx *Context) error {
|
||||
progressbar.OptionClearOnFinish(),
|
||||
)
|
||||
progressCallback := func(fileName string, current string, total string, percentage float64) {
|
||||
progressBar.Set(int(percentage * 10))
|
||||
v := int(percentage * 10)
|
||||
err := progressBar.Set(v)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Str("filename", fileName).Int("value", v).Msg("error while updating progress bar")
|
||||
}
|
||||
}
|
||||
err := gallery.InstallModelFromGallery(galleries, modelName, mi.ModelsPath, gallery.GalleryModel{}, progressCallback)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user