mirror of
https://github.com/mudler/LocalAI.git
synced 2025-06-17 14:38:08 +00:00
fix: pkg/downloader
should respect basePath for file://
urls (#2481)
* pass basePath down to pkg/downloader Signed-off-by: Dave Lee <dave@gray101.com> * enforce Signed-off-by: Dave Lee <dave@gray101.com> --------- Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
@ -36,10 +36,10 @@ func init() {
|
||||
}
|
||||
}
|
||||
|
||||
func GetRemoteLibraryShorteners(url string) (map[string]string, error) {
|
||||
func GetRemoteLibraryShorteners(url string, basePath string) (map[string]string, error) {
|
||||
remoteLibrary := map[string]string{}
|
||||
|
||||
err := downloader.GetURI(url, func(_ string, i []byte) error {
|
||||
err := downloader.GetURI(url, basePath, func(_ string, i []byte) error {
|
||||
return yaml.Unmarshal(i, &remoteLibrary)
|
||||
})
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user