From 6f7505fb91a07035d3661a3a7bf68b3018ddfd82 Mon Sep 17 00:00:00 2001 From: CanadaHonk <19228318+CanadaHonk@users.noreply.github.com> Date: Mon, 27 Jun 2022 08:00:16 +0100 Subject: [PATCH] [Init] Don't die on QS globalPaths fail on Win --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 8354d5d..70328df 100644 --- a/src/index.js +++ b/src/index.js @@ -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