Skip to content

Commit

Permalink
dont fetch env vars starting with = on deno with getAllEnv
Browse files Browse the repository at this point in the history
  • Loading branch information
Pinta365 committed Apr 18, 2024
1 parent 481cad2 commit a23ca27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cross/env",
"version": "1.0.0",
"version": "1.0.1",
"exports": {
".": "./mod.ts",
"./load": "./load.ts"
Expand Down
2 changes: 1 addition & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ export function getAllEnv(prefix?: string): Record<string, string | undefined> {
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);
}
}
Expand Down

0 comments on commit a23ca27

Please sign in to comment.