mirror of
https://github.com/pesde-pkg/scripts.git
synced 2024-12-12 07:00:35 +00:00
chore(lune): only use process.exit
on error to prevent lune panic
This commit is contained in:
parent
c94110ced9
commit
8ac67b89cf
1 changed files with 8 additions and 5 deletions
|
@ -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")
|
||||
|
|
Loading…
Reference in a new issue