Add guard before checking locally installed backends
This commit is contained in:
parent
4e37c361c4
commit
a6e4f28830
@ -18,6 +18,7 @@ export async function getLocalInstalledBackends(): Promise<
|
||||
'llamacpp',
|
||||
'backends',
|
||||
])
|
||||
if (await fs.existsSync(backendsDir)) {
|
||||
const versionDirs = await fs.readdirSync(backendsDir)
|
||||
|
||||
// If the folder does not exist we are done.
|
||||
@ -37,6 +38,7 @@ export async function getLocalInstalledBackends(): Promise<
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return local
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user