Skip to content

Commit 1104eb6

Browse files
authored
Merge pull request #965 from ocaml/do-not-fetch-cygwin-version-on-unix
Do not fetch Cygwin version on Unix
2 parents 7c46486 + 441404e commit 1104eb6

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

dist/index.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/post/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/setup-ocaml/src/cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ import {
2020
} from "./constants.js";
2121
import { latestOpamRelease } from "./opam.js";
2222
import { resolvedCompiler } from "./version.js";
23-
import { cygwinVersion } from "./windows.js";
23+
import { getCygwinVersion } from "./windows.js";
2424

2525
async function composeCygwinCacheKeys() {
26-
const version = await cygwinVersion;
26+
const version = await getCygwinVersion();
2727
const key = `${CACHE_PREFIX}-setup-ocaml-cygwin-${version}`;
2828
const restoreKeys = [key];
2929
return { key, restoreKeys };

packages/setup-ocaml/src/windows.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function createHttpClient() {
1919
);
2020
}
2121

22-
export const cygwinVersion = (async () => {
22+
export async function getCygwinVersion() {
2323
const httpClient = createHttpClient();
2424
const response = await httpClient.get("https://www.cygwin.com");
2525
const body = await response.readBody();
@@ -32,11 +32,11 @@ export const cygwinVersion = (async () => {
3232
}
3333
});
3434
return version;
35-
})();
35+
}
3636

3737
export async function setupCygwin() {
3838
await core.group("Setting up Cygwin environment", async () => {
39-
const version = await cygwinVersion;
39+
const version = await getCygwinVersion();
4040
const cachedPath = toolCache.find("cygwin", version, "x86_64");
4141
if (cachedPath === "") {
4242
const downloadedPath = await toolCache.downloadTool(

0 commit comments

Comments
 (0)