From 7e41fbf81b20f3c27dac4cff44b1b425f50ae79f Mon Sep 17 00:00:00 2001 From: Miguel Serrano Date: Thu, 24 Mar 2022 13:29:11 +0100 Subject: [PATCH] Merge pull request #7102 from overleaf/msm-check-entry-point-dir-settings [settings] add check for `process.argv[1]` GitOrigin-RevId: 24e9e02dc840e9c4206d36b814150b092247d5d9 --- libraries/settings/Settings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/settings/Settings.js b/libraries/settings/Settings.js index 1f98d3a051..e710a0d4f6 100644 --- a/libraries/settings/Settings.js +++ b/libraries/settings/Settings.js @@ -4,7 +4,9 @@ const Path = require('path') const { merge } = require('./merge') const CWD = process.cwd() -const ENTRY_POINT_DIR = Path.dirname(process.argv[1]) +const ENTRY_POINT_DIR = process.argv[1] + ? Path.dirname(process.argv[1]) + : undefined const NODE_ENV = (process.env.NODE_ENV || 'development').toLowerCase() const SHARELATEX_CONFIG = process.env.SHARELATEX_CONFIG