From 4b6df01959c7feb6e9a4394cf09643ae042ea8cd Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Sun, 13 Aug 2023 00:19:55 +0200 Subject: [PATCH] improve BADF on cloud --- backend/windmill-worker/loader_builder.bun.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/windmill-worker/loader_builder.bun.ts b/backend/windmill-worker/loader_builder.bun.ts index 66805ac874..4d7a2b48bf 100644 --- a/backend/windmill-worker/loader_builder.bun.ts +++ b/backend/windmill-worker/loader_builder.bun.ts @@ -5,11 +5,13 @@ const bo = await Bun.build({ external: ["*"], }); +const fs = require("fs/promises"); + if (!bo.success) { bo.logs.forEach((l) => console.log(l)); process.exit(1); } else { - let content = await Bun.file("./out/main.js").text(); + let content = await fs.readFile("./out/main.js", { encoding: "utf8" }); const imports = new Bun.Transpiler().scanImports(content); const { intersect } = require("semver-intersect");