Skip to content

Commit e2179fc

Browse files
committed
Cleanup constants
Signed-off-by: Sora Morimoto <sora@morimoto.io>
1 parent 62861fd commit e2179fc

File tree

3 files changed

+26
-108
lines changed

3 files changed

+26
-108
lines changed

dist/index.js

Lines changed: 9 additions & 36 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: 9 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/setup-ocaml/src/constants.ts

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -86,57 +86,29 @@ export const OPAM_ROOT =
8686

8787
export const ALLOW_PRERELEASE_OPAM = core.getBooleanInput(
8888
"allow-prerelease-opam",
89-
{
90-
required: false,
91-
trimWhitespace: true,
92-
},
9389
);
9490

95-
export const CACHE_PREFIX = core.getInput("cache-prefix", {
96-
required: false,
97-
trimWhitespace: true,
98-
});
91+
export const CACHE_PREFIX = core.getInput("cache-prefix");
9992

100-
export const GITHUB_TOKEN = core.getInput("github-token", {
101-
required: false,
102-
trimWhitespace: true,
103-
});
93+
export const GITHUB_TOKEN = core.getInput("github-token");
10494

105-
export const DUNE_CACHE = core.getBooleanInput("dune-cache", {
106-
required: false,
107-
trimWhitespace: true,
108-
});
95+
export const DUNE_CACHE = core.getBooleanInput("dune-cache");
10996

110-
const OCAML_COMPILER = core.getInput("ocaml-compiler", {
111-
required: true,
112-
trimWhitespace: true,
113-
});
97+
const OCAML_COMPILER = core.getInput("ocaml-compiler", { required: true });
11498

11599
export const OPAM_DISABLE_SANDBOXING =
116100
// [TODO] unlock this once sandboxing is supported on Windows
117101
PLATFORM === "windows"
118102
? true
119-
: core.getBooleanInput("opam-disable-sandboxing", {
120-
required: false,
121-
trimWhitespace: true,
122-
});
103+
: core.getBooleanInput("opam-disable-sandboxing");
123104

124-
export const OPAM_LOCAL_PACKAGES = core.getInput("opam-local-packages", {
125-
required: false,
126-
trimWhitespace: true,
127-
});
105+
export const OPAM_LOCAL_PACKAGES = core.getInput("opam-local-packages", {});
128106

129-
export const OPAM_PIN = core.getBooleanInput("opam-pin", {
130-
required: false,
131-
trimWhitespace: true,
132-
});
107+
export const OPAM_PIN = core.getBooleanInput("opam-pin");
133108

134109
export const OPAM_REPOSITORIES: [string, string][] = (() => {
135110
const repositories_yaml = yaml.parse(
136-
core.getInput("opam-repositories", {
137-
required: false,
138-
trimWhitespace: true,
139-
}),
111+
core.getInput("opam-repositories"),
140112
) as Record<string, string>;
141113
return Object.entries(repositories_yaml).reverse();
142114
})();

0 commit comments

Comments
 (0)