Do a normal build if downloading the precompiled binary fails

issue #904
This commit is contained in:
Simon Edwards 2021-12-29 21:39:16 +01:00
parent 1e403add6d
commit f5665b6a00
2 changed files with 9 additions and 5 deletions

View File

@ -16,7 +16,7 @@
"scripts": {
"dev": "cross-env npm run build && node ./scripts/qode.js dist/demo.js",
"build": "cross-env tsc && npm run build:addon",
"install": "cross-env npm run setupqt && (node ./scripts/skip.js || npm run setupbinary)",
"install": "cross-env npm run setupqt && (node ./scripts/skip.js || npm run setupbinary || npm run build:addon)",
"setupqt": "cross-env node ./scripts/setupMiniQt.js",
"setupbinary": "cross-env node ./scripts/setupBinary.js",
"build:addon": "cross-env CMAKE_BUILD_PARALLEL_LEVEL=8 cmake-js compile",

View File

@ -29,7 +29,11 @@ async function setupBinary() {
fs.unlinkSync(tarPath);
}
setupBinary().catch((err) => {
console.error(err);
process.exit(1);
});
setupBinary()
.catch((err) => {
console.error(err);
process.exit(1);
})
.then(() => {
process.exit(0);
});