Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Don't return falsey

Manav Rathi4abfb5b8bd70
diff --git a/desktop/scripts/beforeBuild.js b/desktop/scripts/beforeBuild.js
index 5ee783f47f..052544004d 100755
--- a/desktop/scripts/beforeBuild.js
+++ b/desktop/scripts/beforeBuild.js
@@ -22,6 +22,8 @@ const fsp = require("fs/promises");
* },
* arch: 'arm64'
*
+ * Note that we must not return falsey from this function, because
+ * > Resolving to false will skip dependencies install or rebuild.
*/
module.exports = async (context) => {
const { appDir, platform, arch } = context;
@@ -34,9 +36,6 @@ module.exports = async (context) => {
// https://nodejs.org/api/process.html#processarch
if (arch == process.arch) {
// `magick.js` would've already downloaded the file, nothing to do.
- //
- // We must not return false, because
- // > Resolving to false will skip dependencies install or rebuild.
return true;
}
@@ -52,12 +51,14 @@ module.exports = async (context) => {
switch (`${platform.nodeName}-${arch}`) {
case "linux-x64":
- return download("magick-x86_64", "magick");
+ await download("magick-x86_64", "magick");
case "linux-arm64":
- return download("magick-aarch64", "magick");
+ await download("magick-aarch64", "magick");
case "win32-x64":
- return download("magick-x64.exe", "magick.exe");
+ await download("magick-x64.exe", "magick.exe");
case "linux-arm64":
- return download("magick-arm64.exe", "magick.exe");
+ await download("magick-arm64.exe", "magick.exe");
}
+
+ return true;
};