Throw a more clear error when the compendia build fails
This commit is contained in:
parent
0b89b0e54e
commit
d11b270019
1 changed files with 5 additions and 1 deletions
|
|
@ -68,7 +68,11 @@ function buildPacks() {
|
|||
return {
|
||||
async writeBundle(options) {
|
||||
const buildDir = options.dir;
|
||||
await buildCompendia();
|
||||
try {
|
||||
await buildCompendia();
|
||||
} catch {
|
||||
throw new Error(`Compendium building failed, make sure Foundry isn't running`);
|
||||
};
|
||||
await cp(`${__dirname}/packs`, `${buildDir}/packs`, { recursive: true, force: true });
|
||||
for (const file of glob.sync(`${buildDir}/packs/**/_source/`)) {
|
||||
await rm(file, { recursive: true, force: true });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue