deno icon indicating copy to clipboard operation
deno copied to clipboard

--env reports dotenv files as not found when the dotenv file has a syntax error, despite reading from it

Open KlaasSkelteAtEnatom opened this issue 9 months ago • 2 comments

Version: Deno 1.43.1

To reproduce: .env

VALID=valid
INVALID=c:\path

test.ts

console.log(Deno.env.get("VALID"));
console.log(Deno.env.get("INVALID"));

Run with deno -A --env test.ts

Output:

Warning The `--env` flag was used, but the dotenv file '.env' was not found.
valid
undefined

This is an improvement over older versions, because it at least loads something. Still, I'd rather have deno not show the warning, because it is factually wrong.

KlaasSkelteAtEnatom avatar May 03 '24 08:05 KlaasSkelteAtEnatom

Hello, @dsherret I’m interested in tackling this issue. I'd like to give it a shot.

Hasan-Alrimawi avatar May 19 '24 07:05 Hasan-Alrimawi

@Hasan-Alrimawi sure!

dsherret avatar May 19 '24 21:05 dsherret

Fixed by #23915

lucacasonato avatar Jun 08 '24 14:06 lucacasonato