fixed install script crash

This commit is contained in:
Nathan DECHER 2020-04-15 12:13:34 +02:00
parent 200c716393
commit 5cf47cd241

View file

@ -4,7 +4,7 @@ const child_process=require('child_process');
// prepare database
console.log('Preparing database');
fs.unlinkSync('db.sqlite');
if(fs.existsSync('db.sqlite')) fs.unlinkSync('db.sqlite');
const db=new DB('db.sqlite');
db.exec(fs.readFileSync('init.sql', 'utf8'));