fix file condition
This commit is contained in:
parent
0eff1bfaa9
commit
84874c6039
@ -1048,7 +1048,7 @@ export default class llamacpp_extension extends AIEngine {
|
|||||||
const archiveName = await basename(path)
|
const archiveName = await basename(path)
|
||||||
logger.info(`Installing backend from path: ${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}`)
|
logger.error(`Invalid path or file ${path}`)
|
||||||
throw new Error(`Invalid path or file ${path}`)
|
throw new Error(`Invalid path or file ${path}`)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user