Skip to content

Commit

Permalink
Don't throw exception if mandatory Metadata key is empty but print er…
Browse files Browse the repository at this point in the history
…ror and stop script.
  • Loading branch information
pavel-karatsiuba committed Mar 22, 2023
1 parent 9ef3275 commit 7119f8c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mwoffliner.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,12 @@ async function execute(argv: any) {
Publisher: dump.opts.publisher,
}

zimMetadataMandatoryKeys.map((key) => {
for (const key of zimMetadataMandatoryKeys) {
if (!zimMetadata[key]) {
throw new Error(`Metadata "${key}" is required`)
logger.error(`Metadata "${key}" is required`)
return
}
})
}

const zimCreator = new ZimCreator(
{
Expand Down

0 comments on commit 7119f8c

Please sign in to comment.