fix(imports): fix checking submodules to prevent error on start

This commit is contained in:
Alexey Kasyanchuk
2023-06-06 04:07:12 +03:00
parent f9ec0c2cbb
commit 03f0ab7a47
2 changed files with 10 additions and 0 deletions

View File

@ -40,6 +40,11 @@ if(majorVersion < 8)
process.exit(1);
}
if (!fs.existsSync(__dirname + '/../../imports') || fs.readdirSync(__dirname + '/../../imports').length == 0) {
logTE('system', 'You are not clonned submodules correctly, please use git clone --recurse-submodules https://github.com/DEgITx/rats-search.git');
process.exit(1);
}
app.use(express.static('web'));
appConfig.restApi = true;