diff --git a/dist/index.js b/dist/index.js index db8a934..ac92e56 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6494,6 +6494,9 @@ async function downloadExtractAndSetPATH(ruby) { async function linkMSYS2() { const toolCacheVersions = tc.findAllVersions('Ruby') toolCacheVersions.sort() + if (toolCacheVersions.length == 0) { + throw new Error('Could not find MSYS2 in the toolcache') + } const latestVersion = toolCacheVersions.slice(-1)[0] const latestHostedRuby = tc.find('Ruby', latestVersion) diff --git a/windows.js b/windows.js index 202d100..bffa788 100644 --- a/windows.js +++ b/windows.js @@ -32,6 +32,9 @@ export async function downloadExtractAndSetPATH(ruby) { async function linkMSYS2() { const toolCacheVersions = tc.findAllVersions('Ruby') toolCacheVersions.sort() + if (toolCacheVersions.length == 0) { + throw new Error('Could not find MSYS2 in the toolcache') + } const latestVersion = toolCacheVersions.slice(-1)[0] const latestHostedRuby = tc.find('Ruby', latestVersion)