Skip to content

Commit

Permalink
fix: proper errchecking on iidx mdb version disagree
Browse files Browse the repository at this point in the history
  • Loading branch information
zkrising committed Nov 12, 2023
1 parent 85d93c9 commit ea084f1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ea084f1

Please sign in to comment.