mirror of
https://github.com/tcsenpai/ollama.git
synced 2025-06-12 14:07:10 +00:00
suppress error when running list before pulling image
This commit is contained in:
parent
ebaa33ac28
commit
09dc6273e3
@ -2,6 +2,7 @@ package server
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
@ -163,6 +164,10 @@ func list(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
err = filepath.Walk(fp, func(path string, info os.FileInfo, err error) error {
|
err = filepath.Walk(fp, func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if errors.Is(err, os.ErrNotExist) {
|
||||||
|
log.Printf("manifest file does not exist: %s", fp)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if !info.IsDir() {
|
if !info.IsDir() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user