Merge pull request #4798 from janhq/chore/do-not-symlink-engine-on-linux

chore: do not symlink engine on linux
This commit is contained in:
David 2025-03-11 23:45:04 +07:00 committed by GitHub
commit 216dbf6ba0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -24,7 +24,7 @@ const symlinkEngines = async () => {
'cortex.llamacpp'
)
const variantFolders = await readdir(sourceEnginePath)
const isAppImage = !!process.env.APPIMAGE
const isStandalone = process.platform === 'linux'
for (const variant of variantFolders) {
const targetVariantPath = path.join(
@ -48,7 +48,7 @@ const symlinkEngines = async () => {
continue
}
if (isAppImage) {
if (isStandalone) {
// Copy files for AppImage environments instead of symlinking
await cp(targetVariantPath, symlinkVariantPath, { recursive: true }).catch(
(error) => log(JSON.stringify(error))