From cd0d9bdd65b20557f41bea4dbe43d0b5fbbfe553 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Wed, 15 Apr 2026 08:41:22 +0200 Subject: [PATCH] GHC: try ghcup first, choco only as fallback --- dist/index.js | 4 ++-- lib/installer.js | 4 ++-- src/installer.ts | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/index.js b/dist/index.js index 63880c2..3453c6e 100644 --- a/dist/index.js +++ b/dist/index.js @@ -35156,10 +35156,10 @@ async function installTool(tool, version, os, arch) { await ghcup(tool, version, os, arch); break; case 'win32': - await choco(tool, version); + await ghcup(tool, version, os, arch); if (await isInstalled(tool, version, os, arch)) return; - await ghcup(tool, version, os, arch); + await choco(tool, version); break; case 'darwin': await ghcup(tool, version, os, arch); diff --git a/lib/installer.js b/lib/installer.js index 3199ae5..e21a346 100644 --- a/lib/installer.js +++ b/lib/installer.js @@ -180,10 +180,10 @@ async function installTool(tool, version, os, arch) { await ghcup(tool, version, os, arch); break; case 'win32': - await choco(tool, version); + await ghcup(tool, version, os, arch); if (await isInstalled(tool, version, os, arch)) return; - await ghcup(tool, version, os, arch); + await choco(tool, version); break; case 'darwin': await ghcup(tool, version, os, arch); diff --git a/src/installer.ts b/src/installer.ts index 96f76ea..1295598 100644 --- a/src/installer.ts +++ b/src/installer.ts @@ -179,9 +179,9 @@ export async function installTool( await ghcup(tool, version, os, arch); break; case 'win32': - await choco(tool, version); - if (await isInstalled(tool, version, os, arch)) return; await ghcup(tool, version, os, arch); + if (await isInstalled(tool, version, os, arch)) return; + await choco(tool, version); break; case 'darwin': await ghcup(tool, version, os, arch);