Skip to content

Commit

Permalink
Do not set OPAMCLI if pre-release opam is allowed
Browse files Browse the repository at this point in the history
Signed-off-by: Sora Morimoto <[email protected]>
  • Loading branch information
smorimoto committed Oct 19, 2023
1 parent 3a69246 commit e6454fa
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to

- Do not install `opam-depext` if using opam 2.2 or later.

### Fixed

- Do not set `OPAMCLI` if pre-release opam is allowed.

## [2.1.0]

### Added
Expand Down
6 changes: 5 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion packages/setup-ocaml/src/installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
saveOpamCache,
} from "./cache";
import {
ALLOW_PRELEASE_OPAM,
DUNE_CACHE,
OCAML_COMPILER,
OPAM_DEPEXT,
Expand All @@ -35,7 +36,11 @@ import { resolveCompiler } from "./version";

export async function installer() {
const platform = getPlatform();
core.exportVariable("OPAMCLI", "2.0");
if (!ALLOW_PRELEASE_OPAM) {
// [todo] remove this once opam 2.2 is released as stable.
// https://github.com/ocaml/setup-ocaml/issues/299
core.exportVariable("OPAMCLI", "2.0");
}
core.exportVariable("OPAMCOLOR", "always");
core.exportVariable("OPAMERRLOGLEN", 0);
core.exportVariable("OPAMJOBS", os.cpus().length);
Expand Down

0 comments on commit e6454fa

Please sign in to comment.