Don't run help generator if it isn't loaded

This commit is contained in:
Essem 2021-05-21 19:08:26 -05:00 committed by GitHub
parent 55a150c0c9
commit f80d6ad31f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -63,11 +63,13 @@ class Shard extends Base {
}
// generate docs
if (helpGenerator) {
await helpGenerator.generateList();
if (this.clusterID === 0 && helpGenerator) {
await helpGenerator.createPage(process.env.OUTPUT);
logger.log("info", "The help docs have been generated.");
}
}
if (process.env.METRICS !== "" && process.env.METRICS !== undefined) {
const httpServer = http.createServer(async (req, res) => {