Better error if MSYS2 is missing

This commit is contained in:
Benoit Daloze
2020-01-05 19:47:18 +01:00
parent 101f62de1d
commit 3c644cf2fc
2 changed files with 6 additions and 0 deletions
Generated Vendored
+3
View File
@@ -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)
+3
View File
@@ -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)