mirror of
https://github.com/goauthentik/authentik.git
synced 2026-06-17 19:09:11 +03:00
ci: explicitly exit Node lint scripts to fix CI hang (#22794)
The three Node scripts that run under `setup-node` (lint-lockfile, lint-runtime, setup-corepack) finish their main work but the Node process does not exit — the event loop is kept alive by an outstanding handle from one of the upstream libraries. In CI this causes the step to hang indefinitely until the runner timeout fires. Add an explicit `process.exit(0)` after the success path in each script. setup-corepack is restructured so `main()` returns the `$`corepack …`` promise and the success log moves into `.then()` before the exit, keeping ordering deterministic. Co-authored-by: Agent (authentik-m-split-pr-committed-every-mikado) <279763771+playpen-agent@users.noreply.github.com>
This commit is contained in:
@@ -102,9 +102,12 @@ async function main() {
|
||||
subcommand = "use";
|
||||
}
|
||||
|
||||
await $`corepack ${subcommand} ${packageManager}`({ cwd });
|
||||
|
||||
logger.info("Corepack installed npm successfully");
|
||||
return $`corepack ${subcommand} ${packageManager}`({ cwd });
|
||||
}
|
||||
|
||||
main().catch((error) => reportAndExit(error, logger));
|
||||
main()
|
||||
.then(() => {
|
||||
logger.info("Corepack setup completed successfully");
|
||||
process.exit(0);
|
||||
})
|
||||
.catch((error) => reportAndExit(error, logger));
|
||||
|
||||
Reference in New Issue
Block a user