Update extensions/llamacpp-extension/src/index.ts

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
Akarshan Biswas 2025-09-10 17:01:31 +05:30 committed by Akarshan
parent 42411b5f33
commit 3cd099ee87
No known key found for this signature in database
GPG Key ID: D75C9634A870665F

View File

@ -1086,7 +1086,7 @@ export default class llamacpp_extension extends AIEngine {
const archiveName = await basename(path)
logger.info(`Installing backend from path: ${path}`)
if (!(await fs.existsSync(path)) && !path.endsWith('tar.gz')) {
if (!(await fs.existsSync(path)) || !path.endsWith('tar.gz')) {
logger.error(`Invalid path or file ${path}`)
throw new Error(`Invalid path or file ${path}`)
}