Improve error messages
parent
7268ae8b8d
commit
cc23142a31
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue