From 15eb44d62df189afb20bd2bd6549f711cdfe69bf Mon Sep 17 00:00:00 2001 From: KernelDeimos Date: Mon, 22 Sep 2025 19:13:05 -0400 Subject: [PATCH] feat: add optional dotenv support This adds an optional import for 'dotenv'. If dotenv is installed via npm then the .env file will be loaded. --- tools/run-selfhosted.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/run-selfhosted.js b/tools/run-selfhosted.js index d27f98523..569e543a6 100644 --- a/tools/run-selfhosted.js +++ b/tools/run-selfhosted.js @@ -26,6 +26,13 @@ import console from 'node:console'; import process from 'node:process'; +try { + const dotenv = require('dotenv'); + dotenv.config(); +} catch (e) { + // dotenv is optional +} + const surrounding_box = (col, lines) => { const lengths = lines.map(line => line.length);