From 8ac67b89cfe2e39941681c6d6ce7e6747eef1f0c Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sun, 8 Dec 2024 12:33:31 +0000 Subject: [PATCH] chore(lune): only use `process.exit` on error to prevent lune panic --- .lune/build.luau | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.lune/build.luau b/.lune/build.luau index e1e4037..2474aff 100644 --- a/.lune/build.luau +++ b/.lune/build.luau @@ -27,14 +27,17 @@ local SCRIPTS = { local args = table.clone(process.args) local ok, _ = require("./lune_packages/core").generators.%s.syncConfig(table.remove(args, 1), args, { writeToFile = true }) - -process.exit(tonumber(ok))]], +if not ok then + return process.exit(1) +end]], sourcemapGenerator = [[local process = require("@lune/process") -return process.exit( - tonumber(require("./lune_packages/core").generators.%s.sourcemap(process.args[1])) -)]], +local ok = require("./lune_packages/core").generators.%s.sourcemap(process.args[1]) +if not ok then + return process.exit(1) +end +]], } local function logPrefix(type: "error" | "info")