diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bda127a..f3077185 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,11 @@ and this project adheres to ## [unreleased] +### Changed + +- Run brew update before set up to avoid an issue with Bintray transition + period. + ## [1.1.9] ## Fixed diff --git a/dist/index.js b/dist/index.js index dd980cdd..950849a9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5080,17 +5080,20 @@ function acquireOpamDarwin(version, customRepository) { switch (_a.label) { case 0: repository = customRepository || "https://github.com/ocaml/opam-repository.git"; - return [4 /*yield*/, exec_1.exec("brew", ["install", "opam"])]; + return [4 /*yield*/, exec_1.exec("brew", ["update"])]; case 1: _a.sent(); - return [4 /*yield*/, exec_1.exec("opam", ["init", "--bare", "-yav", repository])]; + return [4 /*yield*/, exec_1.exec("brew", ["install", "opam"])]; case 2: _a.sent(); - return [4 /*yield*/, exec_1.exec(__nccwpck_require__.ab + "install-ocaml-unix.sh", [version])]; + return [4 /*yield*/, exec_1.exec("opam", ["init", "--bare", "-yav", repository])]; case 3: _a.sent(); - return [4 /*yield*/, exec_1.exec("opam", ["install", "-y", "depext"])]; + return [4 /*yield*/, exec_1.exec(__nccwpck_require__.ab + "install-ocaml-unix.sh", [version])]; case 4: + _a.sent(); + return [4 /*yield*/, exec_1.exec("opam", ["install", "-y", "depext"])]; + case 5: _a.sent(); return [2 /*return*/]; } diff --git a/src/installer.ts b/src/installer.ts index 7960c247..5fff7b9b 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -85,6 +85,7 @@ async function acquireOpamDarwin(version: string, customRepository: string) { const repository = customRepository || "https://github.com/ocaml/opam-repository.git"; + await exec("brew", ["update"]); await exec("brew", ["install", "opam"]); await exec("opam", ["init", "--bare", "-yav", repository]); await exec(path.join(__dirname, "install-ocaml-unix.sh"), [version]);