Skip to content

Commit

Permalink
Merge pull request #732 from ocaml/process-exit
Browse files Browse the repository at this point in the history
Force all actions to exit with `process.exit`
  • Loading branch information
smorimoto authored Dec 6, 2023
2 parents 33d766a + 42c664e commit a382c86
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to

## [unreleased]

### Fixed

- Force all actions to exit with `process.exit`.

## [2.1.7]

### Changed
Expand Down
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 a382c86

Please sign in to comment.