Skip to content

Commit

Permalink
Merge pull request #711 from ocaml/do-not-set-opam-cli-env-pre
Browse files Browse the repository at this point in the history
Do not set `OPAMCLI` if pre-release opam is allowed
  • Loading branch information
smorimoto authored Oct 20, 2023
2 parents 3a69246 + e6454fa commit 1f76f14
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 1f76f14

Please sign in to comment.