fix: proper errchecking on iidx mdb version disagree

This commit is contained in:
zkldi
2023-11-12 20:40:13 +00:00
parent 85d93c9aaa
commit ea084f1b4b
@@ -83,6 +83,15 @@ function isInBlacklist(str: string) {
}
async function ParseIIDXMDB() {
// omni XOR -omni in version name
// either both are true, or both are false
// if they don't match, that's probably a mistake
if (options.omni !== options.version.endsWith("-omni")) {
throw new Error(
`Using --omni flag, but the version you provided was ${options.version}, which doesn't look like an omnimix version.`
);
}
const mdbCharts = await ParseIIDXData(
options.basedir,
options.index,