fix: correct sidecar directory lookup path

This commit is contained in:
Memory 2026-01-10 14:56:10 +08:00 committed by GitHub
parent 52cefa39d3
commit 19ff003352
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,10 +46,10 @@ function getBindingName() {
function loadBinding() {
const bindingName = getBindingName()
// 查找项目根目录的 extra/sidecar
// 查找项目根目录的 sidecar
let currentDir = __dirname
while (currentDir !== require('path').dirname(currentDir)) {
const sidecarPath = join(currentDir, 'extra', 'sidecar', bindingName)
const sidecarPath = join(currentDir, 'sidecar', bindingName)
if (existsSync(sidecarPath)) {
try {
nativeBinding = require(sidecarPath)