Skip to content

Commit

Permalink
Force exit all actions with process.exit
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Dec 6, 2023
1 parent 33d766a commit 68a1ed2
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lint-doc/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lint-fmt/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lint-opam/dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/lint-doc/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-disable unicorn/no-process-exit */
import * as process from "node:process";

import * as core from "@actions/core";

import { lintOdoc } from "./odoc.js";
Expand All @@ -8,10 +11,12 @@ async function run() {
await installOpamPackages();
await installOdoc();
await lintOdoc();
process.exit(0);
} catch (error) {
if (error instanceof Error) {
core.setFailed(error.message);
}
process.exit(1);
}
}

Expand Down
5 changes: 5 additions & 0 deletions packages/lint-fmt/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-disable unicorn/no-process-exit */
import * as process from "node:process";

import * as core from "@actions/core";

import { checkFmt } from "./lint.js";
Expand All @@ -9,10 +12,12 @@ async function run() {
const version = await getOcamlformatVersion();
await installOcamlformat(version);
await checkFmt();
process.exit(0);
} catch (error) {
if (error instanceof Error) {
core.setFailed(error.message);
}
process.exit(1);
}
}

Expand Down
5 changes: 5 additions & 0 deletions packages/lint-opam/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-disable unicorn/no-process-exit */
import * as process from "node:process";

import * as core from "@actions/core";

import { opamDuneLint, opamLint } from "./lint.js";
Expand All @@ -9,10 +12,12 @@ async function run() {
await installOpamDuneLint();
await opamLint();
await opamDuneLint();
process.exit(0);
} catch (error) {
if (error instanceof Error) {
core.setFailed(error.message);
}
process.exit(1);
}
}

Expand Down
5 changes: 5 additions & 0 deletions packages/setup-ocaml/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
/* eslint-disable unicorn/no-process-exit */
import * as process from "node:process";

import * as core from "@actions/core";

import { installer } from "./installer.js";

async function run() {
try {
await installer();
process.exit(0);
} catch (error) {
if (error instanceof Error) {
core.setFailed(error.message);
}
process.exit(1);
}
}

Expand Down

0 comments on commit 68a1ed2

Please sign in to comment.