From e4c9191f72b6bc7924c884d329d79db4c312bc85 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Wed, 17 Jan 2024 18:12:50 -0800 Subject: [PATCH] another fix --- {.github/workflows => archive}/python.yaml | 0 {.github/workflows => archive}/rust.yaml | 0 extensions/vscode/scripts/prepackage.js | 20 +++++++++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) rename {.github/workflows => archive}/python.yaml (100%) rename {.github/workflows => archive}/rust.yaml (100%) diff --git a/.github/workflows/python.yaml b/archive/python.yaml similarity index 100% rename from .github/workflows/python.yaml rename to archive/python.yaml diff --git a/.github/workflows/rust.yaml b/archive/rust.yaml similarity index 100% rename from .github/workflows/rust.yaml rename to archive/rust.yaml diff --git a/extensions/vscode/scripts/prepackage.js b/extensions/vscode/scripts/prepackage.js index 90896f45b..5c1428677 100644 --- a/extensions/vscode/scripts/prepackage.js +++ b/extensions/vscode/scripts/prepackage.js @@ -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")) {