Fix setup.json error handling
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -12,12 +12,11 @@ const flash = require('connect-flash');
|
||||
const fs = require('fs');
|
||||
const SystemReport = require('./models/reportManager.js');
|
||||
|
||||
let setup;
|
||||
let setup = {};
|
||||
try {
|
||||
setup = JSON.parse(fs.readFileSync('setup.json', 'utf8'));
|
||||
} catch (err) {
|
||||
console.error('Error reading setup.json:', err);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
if (setup.discord !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user