fixed install script crash

main
Codinget 5 years ago
parent 6b718000c7
commit 5c1a59a012
  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