fixed install script crash

Nathan DECHER 5 years ago
parent 200c716393
commit 5cf47cd241
  1. 2
      install.js

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

Loading…
Cancel
Save