mirror of
https://github.com/zotero/zotero.git
synced 2026-10-10 03:28:10 +00:00
Add failsafe to ensure pdf.js build worked
This commit is contained in:
parent
a7c76e3202
commit
b6ffa16893
1 changed files with 3 additions and 0 deletions
|
|
@ -41,6 +41,9 @@ async function getReader(signatures) {
|
|||
}
|
||||
await exec('npm ci', { cwd: modulePath });
|
||||
await exec('npm run build:zotero', { cwd: modulePath });
|
||||
if (!fs.pathExists(path.join(modulePath, 'build', 'zotero', 'pdf', 'build', 'pdf.mjs'))) {
|
||||
throw new Error('pdf.js build failed to produce output');
|
||||
}
|
||||
await fs.copy(path.join(modulePath, 'build', 'zotero'), targetDir);
|
||||
}
|
||||
signatures['reader'] = { hash };
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue