fix: 修复架构映射以正确复制库文件

This commit is contained in:
lyswhut
2026-08-21 20:33:01 +08:00
parent e8214393e9
commit 7c3ca2a0fc
5 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ const files = ['better_sqlite3']
const moveFile = async(filePath) => {
const name = `${path.basename(filePath).split('_v')[0].replace('_', '-')}`
for (const fileName of files) {
if (fileName == 'better_sqlite3' && !name.includes('linux')) continue
// if (fileName == 'better_sqlite3' && !name.includes('linux')) continue
const targetPath = path.join(libDir, `${fileName}_${name}.node`)
if (fs.existsSync(targetPath)) await fs.promises.unlink(targetPath)
await fs.promises.rename(path.join(filePath, `${fileName}.node`), targetPath)