From 994a07843ad01ba7b6cb54629e479c9543744e53 Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Sun, 22 Nov 2020 13:00:10 +0200 Subject: [PATCH] Move start-up version string to the very beginning --- src/index.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/index.js b/src/index.js index 9c6f6cb..3ce1a16 100644 --- a/src/index.js +++ b/src/index.js @@ -5,6 +5,10 @@ if (nodeMajorVersion < 12) { process.exit(1); } +// Print out bot and Node.js version +const { getPrettyVersion } = require("./botVersion"); +console.log(`Starting Modmail ${getPrettyVersion()} on Node.js ${process.versions.node}`); + // Verify node modules have been installed const fs = require("fs"); const path = require("path"); @@ -76,9 +80,6 @@ function errorHandler(err) { process.on("uncaughtException", errorHandler); process.on("unhandledRejection", errorHandler); -const { getPrettyVersion } = require("./botVersion"); -console.log(`Starting Modmail ${getPrettyVersion()} on Node.js ${process.versions.node}`); - let testedPackage = ""; try { const packageJson = require("../package.json");