From 99e79744f789e0191a3a5125e51006dc7d766ae3 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Sun, 15 Dec 2024 16:06:11 +0800 Subject: [PATCH] Fix msys2 --- ghcup/src/main.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ghcup/src/main.ts b/ghcup/src/main.ts index e26d703..1806ce7 100644 --- a/ghcup/src/main.ts +++ b/ghcup/src/main.ts @@ -87,6 +87,12 @@ export async function main(opts: Opts) { core.debug(`ghcup bindir is ${bindir}`) core.addPath(bindir); + if (platform.platform == 'win32') { + const ghcup_msys2 = process.env['GHCUP_MSYS2'] ?? 'C:\\msys64'; + core.exportVariable('GHCUP_MSYS2', ghcup_msys2); + core.debug(`GHCUP_MSYS2 is ${ghcup_msys2}`) + } + await exec.exec(ghcupPath, [ 'config', 'set', 'url-source', JSON.stringify(opts.release_channels) ]);