another fix

This commit is contained in:
Nate Sesti 2024-01-17 18:12:50 -08:00
parent 1db9356a15
commit e4c9191f72
3 changed files with 13 additions and 7 deletions

View file

@ -91,13 +91,19 @@ if (args[2] === "--target") {
process.chdir("../extensions/vscode");
// onnxruntime-node
ncp(
path.join(__dirname, "../../../core/node_modules/onnxruntime-node/bin"),
path.join(__dirname, "../bin"),
(error) => {
if (error) console.warn("Error copying onnxruntime-node files", error);
}
);
await new Promise((resolve, reject) => {
ncp(
path.join(__dirname, "../../../core/node_modules/onnxruntime-node/bin"),
path.join(__dirname, "../bin"),
(error) => {
if (error) {
console.warn("Error copying onnxruntime-node files", error);
reject(error);
}
resolve();
}
);
});
if (target) {
// If building for production, only need the binaries for current platform
if (!target.startsWith("darwin")) {