Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deno compile --env does not work #22105

Open
littledivy opened this issue Jan 25, 2024 · 2 comments
Open

deno compile --env does not work #22105

littledivy opened this issue Jan 25, 2024 · 2 comments
Labels
bug Something isn't working correctly cli related to cli/ dir compile related to the `deno compile` feature

Comments

@littledivy
Copy link
Member

littledivy commented Jan 25, 2024

According to f8f4e77

This change adds the --env=[FILE] flag to the run, compile,
eval, install and repl subcommands.

but running deno compile --env main.ts && ./main prints undefined:

console.log(Deno.env.get('TEST'))

The behaviour should be either:

  1. deno compile --env loads env variables from host and restores it when the binary is started.
  2. deno compile --env loads the env variables from the user when the binary is started.

I'd personally prefer 1

@littledivy littledivy added bug Something isn't working correctly cli related to cli/ dir compile related to the `deno compile` feature labels Jan 25, 2024
@dsherret
Copy link
Member

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.

@HasanAlrimawi
Copy link
Contributor

HasanAlrimawi commented Jun 9, 2024

Hello @littledivy @dsherret ,
I'd like to investigate this issue if it has not been resolved yet....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly cli related to cli/ dir compile related to the `deno compile` feature
Projects
None yet
Development

No branches or pull requests

3 participants