Skip to content

Your personal intelligence agent. Watches the world from multiple data sources and pings you when something changes.

fix(env): strip surrounding quotes from .env values

exe.dev userba775565ec3f
diff --git a/apis/utils/env.mjs b/apis/utils/env.mjs
index 0b60ee8..757f3a0 100644
--- a/apis/utils/env.mjs
+++ b/apis/utils/env.mjs
@@ -20,7 +20,11 @@ function loadEnv(filePath) {
const eq = trimmed.indexOf('=');
if (eq === -1) continue;
const key = trimmed.slice(0, eq).trim();
- const val = trimmed.slice(eq + 1).trim();
+ let val = trimmed.slice(eq + 1).trim();
+ // Strip surrounding quotes (single or double) to support special characters
+ if ((val.startsWith('"') && val.endsWith('"')) || (val.startsWith("'") && val.endsWith("'"))) {
+ val = val.slice(1, -1);
+ }
if (!process.env[key]) { process.env[key] = val; loaded++; }
}
return loaded;