Skip to content

Commit

Permalink
fix: Fix the case that the missing jar causing install failed
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed May 9, 2024
1 parent 4c2bb7a commit b3f1be4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function useInstanceVersionDiagnose(path: Ref<string>, runtime: Ref<Runti
if (jarIssue) {
const options = { version: jarIssue.version }
operations.push(async () => {
const version = await install(runtime.value)
const version = await install(runtime.value, true)
if (version) {
await installDependencies(version)
}
Expand Down
4 changes: 2 additions & 2 deletions xmcl-keystone-ui/src/composables/instanceVersionInstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ export function useInstanceVersionInstall(versions: Ref<LocalVersionHeader[]>) {
getLabyModManifest,
} = useService(VersionMetadataServiceKey)

async function install(runtime: RuntimeVersions) {
async function install(runtime: RuntimeVersions, jar = false) {
const { minecraft, forge, fabricLoader, quiltLoader, optifine, neoForged, labyMod } = runtime
const mcVersions = await getCacheOrFetch('/minecraft-versions', () => getMinecraftVersionList())
const local = versions.value
const localMinecraft = local.find(v => v.id === minecraft)
if (!localMinecraft) {
if (!localMinecraft || jar) {
const metadata = mcVersions.versions.find(v => v.id === minecraft)!
await installMinecraft(metadata)
} else {
Expand Down

0 comments on commit b3f1be4

Please sign in to comment.