Improve error messages

master
Dragory 2020-05-25 02:38:35 +03:00
parent 7268ae8b8d
commit cc23142a31
No known key found for this signature in database
GPG Key ID: 5F387BA66DF8AAC1
2 changed files with 3 additions and 3 deletions

View File

@ -279,7 +279,7 @@ for (const [key, value] of Object.entries(finalConfig)) {
// Make sure all of the required config options are present // Make sure all of the required config options are present
for (const opt of required) { for (const opt of required) {
if (! finalConfig[opt]) { if (! finalConfig[opt]) {
console.error(`Missing required config.json value: ${opt}`); console.error(`Missing required configuration value: ${opt}`);
process.exit(1); process.exit(1);
} }
} }

View File

@ -12,7 +12,7 @@ const path = require('path');
try { try {
fs.accessSync(path.join(__dirname, '..', 'node_modules')); fs.accessSync(path.join(__dirname, '..', 'node_modules'));
} catch (e) { } 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); process.exit(1);
} }
@ -37,7 +37,7 @@ try {
fs.accessSync(path.join(__dirname, '..', 'node_modules', mod)) fs.accessSync(path.join(__dirname, '..', 'node_modules', mod))
}); });
} catch (e) { } 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); process.exit(1);
} }