deno
deno copied to clipboard
`deno compile --env` does not work
According to https://github.com/denoland/deno/commit/f8f4e776325efe0d8dd50207beecb425f0875999
This change adds the
--env=[FILE]
flag to therun
,compile
,eval
,install
andrepl
subcommands.
but running deno compile --env main.ts && ./main
prints undefined
:
console.log(Deno.env.get('TEST'))
The behaviour should be either:
-
deno compile --env
loads env variables from host and restores it when the binary is started. -
deno compile --env
loads the env variables from the user when the binary is started.
I'd personally prefer 1
We should probably do 1, but print a warning that the environment variables are being stored in the binary just to be super clear about what's going on.
Hello @littledivy @dsherret , I'd like to investigate this issue if it has not been resolved yet....
@dsherret this should probably be closed now
Fixed with https://github.com/denoland/deno/pull/24166. Thanks @HasanAlrimawi