From a23ca27db33f4ab829435e50174b400f8697160d Mon Sep 17 00:00:00 2001 From: Pinta365 Date: Thu, 18 Apr 2024 23:05:21 +0200 Subject: [PATCH] dont fetch env vars starting with = on deno with getAllEnv --- deno.jsonc | 2 +- mod.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deno.jsonc b/deno.jsonc index 9140fae..a71fcd5 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,6 +1,6 @@ { "name": "@cross/env", - "version": "1.0.0", + "version": "1.0.1", "exports": { ".": "./mod.ts", "./load": "./load.ts" diff --git a/mod.ts b/mod.ts index 7756f01..1db0003 100644 --- a/mod.ts +++ b/mod.ts @@ -198,7 +198,7 @@ export function getAllEnv(prefix?: string): Record { switch (currentRuntime) { case "deno": for (const key of Object.keys(Deno.env.toObject())) { - if (!prefix || key.startsWith(prefix)) { + if (!key.startsWith("=") && (!prefix || key.startsWith(prefix))) { envVars[key] = Deno.env.get(key); } }