Skip to content

Commit

Permalink
🐛 Check if path exists before updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Androz2091 committed Aug 12, 2020
1 parent ab04d24 commit e08b9fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions helpers/autoUpdateDocs.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ module.exports = {
text += `${table(arrCat)}\n\n`;
});
const fs = require("fs");
fs.writeFileSync("./docs/commands.md", text);
client.logger.log("Docs updated!");
if(fs.existsSync("./docs")){
fs.writeFileSync("./docs/commands.md", text);
client.logger.log("Docs updated!");
}
}

};

0 comments on commit e08b9fc

Please sign in to comment.