From 5cb5700273dfe54403c6f327d92b8d4f182072a9 Mon Sep 17 00:00:00 2001 From: Kir_Antipov Date: Sat, 20 May 2023 09:35:51 +0300 Subject: [PATCH] Fixed default `GameVersionProvider` resolution --- src/program.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/program.ts b/src/program.ts index ddd9baa..8f6f0a3 100644 --- a/src/program.ts +++ b/src/program.ts @@ -1,5 +1,6 @@ import { McPublishInput, McPublishOutput } from "@/action"; import { GameVersionFilter, getGameVersionProviderByName } from "@/games"; +import { MINECRAFT } from "@/games/minecraft"; import { LoaderMetadataReader, createDefaultLoaderMetadataReader } from "@/loaders"; import { PlatformType, createPlatformUploader } from "@/platforms"; import { GitHubContext } from "@/platforms/github"; @@ -102,7 +103,7 @@ async function fillInDefaultValues(optio const primaryFile = options.files[0]; const metadata = await reader?.readMetadataFile(primaryFile.path); - const gameVersionProvider = getGameVersionProviderByName(metadata?.gameName); + const gameVersionProvider = getGameVersionProviderByName(metadata?.gameName || MINECRAFT); const wrappedGameVersions = options.gameVersions?.length ? options.gameVersions : (metadata?.gameVersions || []); const gameVersions = await gameVersionProvider?.(wrappedGameVersions); const unwrappedGameVersions = gameVersions ? GameVersionFilter.filter(gameVersions, options.gameVersionFilter).map(x => x.id) : wrappedGameVersions;