diff --git a/dist/index.js b/dist/index.js index 92d8aec2..4ab134b3 100644 --- a/dist/index.js +++ b/dist/index.js @@ -92603,6 +92603,7 @@ const PLATFORM = (() => { const CYGWIN_MIRROR = "https://cygwin.mirror.constant.com/"; // [HACK] https://github.com/ocaml/setup-ocaml/pull/55 const CYGWIN_ROOT = external_node_path_namespaceObject.join("D:", "cygwin"); +const CYGWIN_ROOT_BIN = external_node_path_namespaceObject.join(CYGWIN_ROOT, "bin"); const DUNE_CACHE_ROOT = (() => { const homeDir = external_node_os_.homedir(); if (PLATFORM === "windows") { @@ -110570,9 +110571,12 @@ async function installer() { }); } const { opamCacheHit, cygwinCacheHit } = await restoreOpamCaches(); - if (!cygwinCacheHit && PLATFORM === "windows") { - await setupCygwin(); - await saveCygwinCache(); + if (PLATFORM === "windows") { + if (!cygwinCacheHit) { + await setupCygwin(); + await saveCygwinCache(); + } + lib_core.addPath(CYGWIN_ROOT_BIN); } await setupOpam(); await repositoryRemoveAll(); diff --git a/dist/post/index.js b/dist/post/index.js index a0b76642..385d17bd 100644 --- a/dist/post/index.js +++ b/dist/post/index.js @@ -84737,6 +84737,7 @@ const constants_PLATFORM = (() => { const constants_CYGWIN_MIRROR = "https://cygwin.mirror.constant.com/"; // [HACK] https://github.com/ocaml/setup-ocaml/pull/55 const constants_CYGWIN_ROOT = external_node_path_namespaceObject.join("D:", "cygwin"); +const CYGWIN_ROOT_BIN = external_node_path_namespaceObject.join(constants_CYGWIN_ROOT, "bin"); const DUNE_CACHE_ROOT = (() => { const homeDir = external_node_os_.homedir(); if (constants_PLATFORM === "windows") { diff --git a/packages/setup-ocaml/src/constants.ts b/packages/setup-ocaml/src/constants.ts index 88b0a458..2537e928 100644 --- a/packages/setup-ocaml/src/constants.ts +++ b/packages/setup-ocaml/src/constants.ts @@ -52,6 +52,8 @@ export const CYGWIN_MIRROR = "https://cygwin.mirror.constant.com/"; // [HACK] https://github.com/ocaml/setup-ocaml/pull/55 export const CYGWIN_ROOT = path.join("D:", "cygwin"); +export const CYGWIN_ROOT_BIN = path.join(CYGWIN_ROOT, "bin"); + export const DUNE_CACHE_ROOT = (() => { const homeDir = os.homedir(); if (PLATFORM === "windows") { diff --git a/packages/setup-ocaml/src/installer.ts b/packages/setup-ocaml/src/installer.ts index 494d4a44..8dee613d 100644 --- a/packages/setup-ocaml/src/installer.ts +++ b/packages/setup-ocaml/src/installer.ts @@ -9,6 +9,7 @@ import { saveOpamCache, } from "./cache.js"; import { + CYGWIN_ROOT_BIN, DUNE_CACHE, DUNE_CACHE_ROOT, OCAML_COMPILER, @@ -62,9 +63,12 @@ export async function installer() { ); } const { opamCacheHit, cygwinCacheHit } = await restoreOpamCaches(); - if (!cygwinCacheHit && PLATFORM === "windows") { - await setupCygwin(); - await saveCygwinCache(); + if (PLATFORM === "windows") { + if (!cygwinCacheHit) { + await setupCygwin(); + await saveCygwinCache(); + } + core.addPath(CYGWIN_ROOT_BIN); } await setupOpam(); await repositoryRemoveAll();