[Init] Don't die on QS globalPaths fail on Win

This commit is contained in:
CanadaHonk 2022-06-27 08:00:16 +01:00 committed by GitHub
parent c6f2f5eb78
commit 6f7505fb91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -22,7 +22,9 @@ require('./cmdSwitches')();
const M = require('module'); // Module
const b = join(paths.getExeDir(), 'modules'); // Base dir
if (process.platform === 'win32') for (const m of require('fs').readdirSync(b)) M.globalPaths.push(join(b, m)); // For each module dir, add to globalPaths
if (process.platform === 'win32') try {
for (const m of require('fs').readdirSync(b)) M.globalPaths.push(join(b, m)); // For each module dir, add to globalPaths
} catch { log('Init', 'Failed to QS globalPaths') }
if (process.argv.includes('--overlay-host')) { // If overlay