From 7d3964b68f67a5d2da1f3b765c581e8dff1e91d1 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Tue, 13 Apr 2021 08:03:21 +0900 Subject: [PATCH] Run brew update before set up Signed-off-by: Sora Morimoto --- CHANGELOG.md | 5 +++++ dist/index.js | 11 +++++++---- src/installer.ts | 1 + 3 files changed, 13 insertions(+), 4 deletions(-) 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]);