From cc23142a317e3e69e56b1abeb113cf8c91e024ee Mon Sep 17 00:00:00 2001 From: Dragory <2606411+Dragory@users.noreply.github.com> Date: Mon, 25 May 2020 02:38:35 +0300 Subject: [PATCH] Improve error messages --- src/config.js | 2 +- src/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/config.js b/src/config.js index a2e3beb..5d649f8 100644 --- a/src/config.js +++ b/src/config.js @@ -279,7 +279,7 @@ for (const [key, value] of Object.entries(finalConfig)) { // Make sure all of the required config options are present for (const opt of required) { if (! finalConfig[opt]) { - console.error(`Missing required config.json value: ${opt}`); + console.error(`Missing required configuration value: ${opt}`); process.exit(1); } } diff --git a/src/index.js b/src/index.js index c2acebf..f43c33f 100644 --- a/src/index.js +++ b/src/index.js @@ -12,7 +12,7 @@ const path = require('path'); try { fs.accessSync(path.join(__dirname, '..', 'node_modules')); } catch (e) { - console.error('Please run "npm install" before starting the bot'); + console.error('Please run "npm ci" before starting the bot'); process.exit(1); } @@ -37,7 +37,7 @@ try { fs.accessSync(path.join(__dirname, '..', 'node_modules', mod)) }); } catch (e) { - console.error(`Please run "npm install" again! Package "${testedPackage}" is missing.`); + console.error(`Please run "npm ci" again! Package "${testedPackage}" is missing.`); process.exit(1); }