fix(imports): fix checking submodules to prevent error on start
This commit is contained in:
parent
f9ec0c2cbb
commit
03f0ab7a47
@ -102,6 +102,11 @@ if(portative)
|
|||||||
process.on('unhandledRejection', r => logTE('system', 'Rejection:', r));
|
process.on('unhandledRejection', r => logTE('system', 'Rejection:', r));
|
||||||
process.on('uncaughtException', (err, origin) => logTE('system', 'Exception:', err, 'Origin:', origin));
|
process.on('uncaughtException', (err, origin) => logTE('system', 'Exception:', err, 'Origin:', origin));
|
||||||
|
|
||||||
|
if (env.name !== "production" && (!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);
|
||||||
|
}
|
||||||
|
|
||||||
const gotTheLock = app.requestSingleInstanceLock()
|
const gotTheLock = app.requestSingleInstanceLock()
|
||||||
if (!gotTheLock) {
|
if (!gotTheLock) {
|
||||||
logT('app', 'closed because of second application')
|
logT('app', 'closed because of second application')
|
||||||
|
@ -40,6 +40,11 @@ if(majorVersion < 8)
|
|||||||
process.exit(1);
|
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'));
|
app.use(express.static('web'));
|
||||||
|
|
||||||
appConfig.restApi = true;
|
appConfig.restApi = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user