deno
deno copied to clipboard
--env reports dotenv files as not found when the dotenv file has a syntax error, despite reading from it
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.
Hello, @dsherret I’m interested in tackling this issue. I'd like to give it a shot.
@Hasan-Alrimawi sure!
Fixed by #23915