Skip to content

Commit 42c664e

Browse files
committed
Force all actions to exit with process.exit
Signed-off-by: Sora Morimoto <[email protected]>
1 parent 33d766a commit 42c664e

File tree

9 files changed

+48
-2
lines changed

9 files changed

+48
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to
88

99
## [unreleased]
1010

11+
### Fixed
12+
13+
- Force all actions to exit with `process.exit`.
14+
1115
## [2.1.7]
1216

1317
### Changed

dist/index.js

+6-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lint-doc/dist/index.js

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lint-fmt/dist/index.js

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lint-opam/dist/index.js

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/lint-doc/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint-disable unicorn/no-process-exit */
2+
import * as process from "node:process";
3+
14
import * as core from "@actions/core";
25

36
import { lintOdoc } from "./odoc.js";
@@ -8,10 +11,12 @@ async function run() {
811
await installOpamPackages();
912
await installOdoc();
1013
await lintOdoc();
14+
process.exit(0);
1115
} catch (error) {
1216
if (error instanceof Error) {
1317
core.setFailed(error.message);
1418
}
19+
process.exit(1);
1520
}
1621
}
1722

packages/lint-fmt/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint-disable unicorn/no-process-exit */
2+
import * as process from "node:process";
3+
14
import * as core from "@actions/core";
25

36
import { checkFmt } from "./lint.js";
@@ -9,10 +12,12 @@ async function run() {
912
const version = await getOcamlformatVersion();
1013
await installOcamlformat(version);
1114
await checkFmt();
15+
process.exit(0);
1216
} catch (error) {
1317
if (error instanceof Error) {
1418
core.setFailed(error.message);
1519
}
20+
process.exit(1);
1621
}
1722
}
1823

packages/lint-opam/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/* eslint-disable unicorn/no-process-exit */
2+
import * as process from "node:process";
3+
14
import * as core from "@actions/core";
25

36
import { opamDuneLint, opamLint } from "./lint.js";
@@ -9,10 +12,12 @@ async function run() {
912
await installOpamDuneLint();
1013
await opamLint();
1114
await opamDuneLint();
15+
process.exit(0);
1216
} catch (error) {
1317
if (error instanceof Error) {
1418
core.setFailed(error.message);
1519
}
20+
process.exit(1);
1621
}
1722
}
1823

packages/setup-ocaml/src/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1+
/* eslint-disable unicorn/no-process-exit */
2+
import * as process from "node:process";
3+
14
import * as core from "@actions/core";
25

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

58
async function run() {
69
try {
710
await installer();
11+
process.exit(0);
812
} catch (error) {
913
if (error instanceof Error) {
1014
core.setFailed(error.message);
1115
}
16+
process.exit(1);
1217
}
1318
}
1419

0 commit comments

Comments
 (0)