Skip to content

Commit 8c1900e

Browse files
committed
fix: wrong error catching
1 parent 4fa88ba commit 8c1900e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/installer/diagnose.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ export function diagnoseTask(version: string, minecraftLocation: MinecraftLocati
145145
try {
146146
resolvedVersion = await context.execute(task("checkVersionJson", () => Version.parse(minecraft, version)));
147147
} catch (e) {
148-
if (e.type === "CorruptedVersionJson") {
148+
if (e.error === "CorruptedVersionJson") {
149149
issues.push({ type: "corrupted", role: "versionJson", file: minecraft.getVersionJson(e.version), expectedChecksum: "", receivedChecksum: "", hint: "Re-install the minecraft!" });
150-
} else if (e.type === "MissingVersionJson") {
150+
} else {
151151
issues.push({ type: "missing", role: "versionJson", file: minecraft.getVersionJson(e.version), expectedChecksum: "", receivedChecksum: "", hint: "Re-install the minecraft!" });
152152
}
153153
return report;

0 commit comments

Comments
 (0)