This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
openclaw-extensions/wecom/node_modules/node-llama-cpp/dist/bindings/utils/resolveActualBindingBinaryPath.js
T

18 lines
624 B
JavaScript

import path from "path";
import fs from "fs-extra";
import { runningInElectron } from "../../utils/runtime.js";
export async function resolveActualBindingBinaryPath(binaryPath) {
const absolutePath = path.resolve(binaryPath);
if (!runningInElectron)
return absolutePath;
const fixedAsarPath = absolutePath.replace(".asar" + path.sep, ".asar.unpacked" + path.sep);
try {
if (await fs.pathExists(fixedAsarPath))
return fixedAsarPath;
return absolutePath;
}
catch (err) {
return absolutePath;
}
}
//# sourceMappingURL=resolveActualBindingBinaryPath.js.map