Skip to content

Commit 05dd32f

Browse files
committed
Expose OPAMCONFIRMLEVEL if allow-prerelease-opam is enabled
Signed-off-by: Sora Morimoto <sora@morimoto.io>
1 parent ceb41f8 commit 05dd32f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

dist/index.js

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

packages/setup-ocaml/src/installer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ import { updateUnixPackageIndexFiles } from "./system.js";
3535
import { resolveCompiler } from "./version.js";
3636

3737
export async function installer() {
38-
if (!ALLOW_PRERELEASE_OPAM) {
38+
if (ALLOW_PRERELEASE_OPAM) {
39+
core.exportVariable("OPAMCONFIRMLEVEL", "unsafe-yes");
40+
} else {
3941
// [todo] remove this once opam 2.2 is released as stable.
4042
// https://github.com/ocaml/setup-ocaml/issues/299
4143
core.exportVariable("OPAMCLI", "2.0");
@@ -48,7 +50,6 @@ export async function installer() {
4850
// https://github.com/ocaml/opam/issues/3447
4951
core.exportVariable("OPAMSOLVERTIMEOUT", 1000);
5052
core.exportVariable("OPAMYES", 1);
51-
core.exportVariable("OPAMCONFIRMLEVEL", "unsafe-yes");
5253
if (PLATFORM === "win32") {
5354
const opamRoot = path.join("D:", ".opam");
5455
core.exportVariable("OPAMROOT", opamRoot);

0 commit comments

Comments
 (0)