Skip to content

Commit ac563f3

Browse files
authored
Merge pull request #629 from ocaml/fail-on-missing-required-input
Fail on missing required input instead of warning
2 parents 974b17e + 938451a commit ac563f3

File tree

4 files changed

+34
-9
lines changed

4 files changed

+34
-9
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ and this project adheres to
1212

1313
- Add support for arm64.
1414

15+
### Changed
16+
17+
- Fail on missing required input instead of warning.
18+
1519
## [2.0.5]
1620

1721
### Changed

dist/index.js

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 10 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/setup-ocaml/constants.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,53 @@ export const CYGWIN_ROOT_BIN = path.join(CYGWIN_ROOT, "bin");
2222
export const CYGWIN_ROOT_WRAPPERBIN = path.join(CYGWIN_ROOT, "wrapperbin");
2323

2424
export const CACHE_PREFIX = core.getInput("cache-prefix", {
25+
required: false,
2526
trimWhitespace: true,
2627
});
2728

2829
export const GITHUB_TOKEN = core.getInput("github-token", {
30+
required: false,
2931
trimWhitespace: true,
3032
});
3133

3234
export const DUNE_CACHE = core.getBooleanInput("dune-cache", {
35+
required: false,
3336
trimWhitespace: true,
3437
});
3538

3639
export const OCAML_COMPILER = core.getInput("ocaml-compiler", {
40+
required: true,
3741
trimWhitespace: true,
3842
});
3943

4044
export const OPAM_DEPEXT = core.getBooleanInput("opam-depext", {
45+
required: false,
4146
trimWhitespace: true,
4247
});
4348

4449
export const OPAM_DEPEXT_FLAGS = core
45-
.getInput("opam-depext-flags", { trimWhitespace: true })
50+
.getInput("opam-depext-flags", { required: false, trimWhitespace: true })
4651
.split(",")
4752
.map((f) => f.trim())
4853
.filter((f) => f.length > 0);
4954

5055
export const OPAM_DISABLE_SANDBOXING = core.getBooleanInput(
5156
"opam-disable-sandboxing",
52-
{ trimWhitespace: true }
57+
{ required: false, trimWhitespace: true }
5358
);
5459

5560
export const OPAM_LOCAL_PACKAGES = core.getInput("opam-local-packages", {
61+
required: false,
5662
trimWhitespace: true,
5763
});
5864

5965
export const OPAM_PIN = core.getBooleanInput("opam-pin", {
66+
required: false,
6067
trimWhitespace: true,
6168
});
6269

6370
const repositories_yaml = yaml.parse(
64-
core.getInput("opam-repositories", { trimWhitespace: true })
71+
core.getInput("opam-repositories", { required: false, trimWhitespace: true })
6572
) as Record<string, string> | null;
6673

6774
const platform = getPlatform();

0 commit comments

Comments
 (0)